Question

I am trying to program my Arduino UNO to implement a flashing pattern with two LEDs....

I am trying to program my Arduino UNO to implement a flashing pattern with two LEDs. When one LED is off, the other must be on. The program needs to be done in assembly. I have a working program in c++ but I need to convert it to assembly.

Here is my c++ program:

int led = 13;
int led2 = 12;

void setup() {   

pinMode(led, OUTPUT);
pinMode(led2, OUTPUT);
}

void loop() {
digitalWrite(led, HIGH);   
delay(1000);
digitalWrite(led, LOW);
{digitalWrite(led2, HIGH);
delay(1000);
digitalWrite(led2, LOW);
}
}

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
I am trying to program my Arduino UNO to implement a flashing pattern with two LEDs....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Assume the following script is uploaded to an Arduino UNO and a digital multimeter is used...

    Assume the following script is uploaded to an Arduino UNO and a digital multimeter is used to measure the voltage between Arduino pin 12 (red probe or +) and pin 13 (black probe or -). void setup) pinMode(13, OUTPUT); pinMode(12, OUTPUT); } void loop(){ digitalWrite(13, HIGH); digitalWrite(12, LOW); delay(500); digitalWrite(13, HIGH); digitalWrite(12, HIGH); delay(500); } Select one: о a. -5 Volts, 500 second delay, 0 volts, 500 second delay, repeat second delay, 0 volts, V2 second delay, repeat о b....

  • Assume the following script is uploaded to an Arduino UNO and a digital multimeter is used...

    Assume the following script is uploaded to an Arduino UNO and a digital multimeter is used to measure the voltage between Arduino pin 12 (red probe or +) and pin 13 (black probe or -). void setup() { pinMode(13, OUTPUT); pinMode(12, OUTPUT); void loop() { digitalWrite(13, HIGH); digitalWrite(12, LOW); delay(500); digitalWrite(13, HIGH); digitalWrite(12, HIGH); delay(500); O O Select one: a. -5 Volts, 500 second delay, 0 volts, 500 second delay, repeat b. - 5 Volts, 12 second delay, +5 Volts,...

  • An Arduino Uno is configured with the voltage divider connected to Analog input pin AO as...

    An Arduino Uno is configured with the voltage divider connected to Analog input pin AO as shown, and the code shown below is uploaded. What happens? testCodeA Arduino 1.8.11 Hourly Build 2019/10/29 11:12 Arduino Uno testCodeA #define LED 13 to sv 13o 5ke & void setup() { pinMode(LED, OUTPUT); to A 10KZ Ž ŞR void loop() { int voltage-analogRead(AO); if (voltage > 1024/2) digitalWrite(LED, HIGH); else digitalWrite(LED, LOW); GND GND Done compiling Sketch uses 778 bytes (2%) of program storage...

  • An Arduino Uno is configured with the voltage divider connected to Analog input pin AO as...

    An Arduino Uno is configured with the voltage divider connected to Analog input pin AO as shown, and the code shown below is uploaded. What happens? testCodeA Arduino 1.8.11 Hourly Build 2019/10/29 11:12 Arduino testCodeA Uno #define LED 13 to SV 130 5ks § void setup() { pinMode(LED, OUTPUT); B toap ŹR 10 Kaş void loop 1 int voltage analogRead(AO); if (voltage > 1024/2) digitalWrite(LED, HIGH); else digitalWrite(LED, LOW); HOGNO Gong Done compiling Sketch uses 778 bytes (2%) of program...

  • void setup () Write the following code and upload it to the { Arduino, observe and...

    void setup () Write the following code and upload it to the { Arduino, observe and comment on the pinMode (8, OUTPUT); pinMode (2, INPUT); digitalWrite (8, HIGH); function of the circuit and explain how the code is working. In addition, explain how to turn ON the LED in case it is OFF. void loop () { digitalRead (2) int A if (A 0) { digitalWrite (8, LOW); void setup () Write the following code and upload it to the...

  • Mechatronics void setup () Write the following code and upload it to the { Arduino, observe...

    Mechatronics void setup () Write the following code and upload it to the { Arduino, observe and comment on the pinMode (8, OUTPUT) function of the circuit and explain how the pinMode (2, INPUT); code is working. In addition, explain how to digitalWrite (8, HIGH) turn ON the LED in case it is OFF. void loop () { digitalRead (2) int A if (A 0) { digitalWrite (8, LOW) void setup () Write the following code and upload it to...

  • I have a program for Arduino written such that when I hold a button down, it...

    I have a program for Arduino written such that when I hold a button down, it will turn an LED off. I want to be able to print to the serial monitor how long the button was pressed for after I let go of the button. Does anybody have any ideas? Below is the code I have written thus far: Text of Code: #define LED RED_LED #define buttonPIN PUSH2 const int buttonPin = PUSH2; // the number of the pushbutton...

  • Program is for an Arduino 1. Add the letters “A”, “b”, “c”, “d”, “E”, “F” to...

    Program is for an Arduino 1. Add the letters “A”, “b”, “c”, “d”, “E”, “F” to your homework program. Continually display “0123”, “4567”, “89Ab”, “cdEF” with a one second delay between each one. HINT: Expand pickNumber() to use numbers 10-15 (a-f in hex). Create new functions for a-f. (THIS IS THE CODE FROM THE HOMEWORK) /*************************************** name:Stopwatch function: you can see the number increases by one per second on the 4-digit 7-segment display. ***********************************/ //Email:[email protected] //Website:www.sunfounder.com /**************************************/ #include //the pins...

  • I am doing an Arduino Uno project where I made a "Simon says" memory game with 3 neopixel LED str...

    I am doing an Arduino Uno project where I made a "Simon says" memory game with 3 neopixel LED strips and 3 - ultrasonics. I have them working independently but I need to combine the code so they work together. Here is what I have: Memory Game #define PLAYER_WAIT_TIME 2000 // The time allowed between button presses - 2s byte sequence[100]; // Storage for the light sequence byte curLen = 0; // Current length of the sequence byte inputCount =...

  • An Arduino Uno is configured with the voltage divider connected to Analog input pin A0 as...

    An Arduino Uno is configured with the voltage divider connected to Analog input pin A0 as shown, and the code shown below is uploaded. What happens? testCodeA | Arduino 1.8.1 1 Hourly Build 2019/10/29 11:12 As dum o testCodeA Uno #define LED 13 5v void setup) { pinModeCLED, OUTPUT) ; } 13 5k-R Ap void loop) int voltage-anal ogRead (A0) ; if (voltage 1024/2) digitalWrite(LED, HIGH); else R digital Write(LED, LOW); } GND Done compiling. Sketch uses 778 bytes (2%)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT