Microcontroller Basics with Arduino Program Project Hi, Actually, I need someone to do coding ARDUINO. There are two tasks, I did the first one, I need someone to do task 2. I have task1, I will send it to you to complete the assignment. Read the instructions carefully and there are a details about the assignment. LAB 1: MICROCONTROLLER BASICS WITH ARDUINO
Objective:
Interacting with Arduino by using the Serial Monitor through serial communications
Procedure:
Task 1. Using the Serial Monitor to control alternating lights:
1.
Control the alternating lights code by sending commands through serial monitor. When the final program starts, both
lights will be off. When the l key is hit, the program will start and run until Okey is pressed. The program gives an
error message when any other key is pressed.
Task 2. (On your own)
o
o
o
o
1. Create a code, by using the concepts you have learned, that alternates between an external LED that is attached at pin 5
(OUT2) and the internal LED at pin 13 on Arduino (OUT1). The code should do the following:
Immediately when the code is started, the LED at pin 13 (OUT1) should be ON for 4 sec.
After 4 sec, OUTI should turn off at the same time as LED at pin 5 (OUT2) should turn ON.
OUT2 should remain on for 500 msec and then off for 500 msec, which should repeat a total of 3 times.
Immediately after OUT2 goes off for the last time, OUT1 should turn ON again and the cycle repeats.
2. Now wrap your code inside a virtual control panel by independently learning about operating on strings. In the end,
your program should:
Start looping the outcome of the code you wrote in Step 1 until the user sends one of the following commands
on the Serial Monitor:
OUT{X}:{duration}: {number of cycles}
Here:
o
o
o
{X} takes the value 1 for the on board LED and the value 2 for the external LED
{duration} specifies the blink interval value of the ON and OFF time in miliseconds (should be ON and OFF
for the same amount of time) of the specified LED. The other LED settings remain the same. Immediately after
the specified LED completes its cycles and turns off, the other LED should start its cycle.
{number of cycles} specifies how many times the specified LED should blink as set under duration.
o
Below are two examples of how the command is utilized:
Current status: Original cycle of Step 1. OUT1 blinks for 5 sec. then turns off, OUT2 blinks 3 times in 500
msec intervals. Cycle repeats.
Goal: Change the blink interval time of 2nd LED to 1000 msec and make it blink 4 times:
Command to send to Arduino:OUT2:1000:4
Current status: OUT1 blinks for 1 sec. turns off, OUT2 blinks four times in 1 sec intervals. Cycle repeats
Goal: Change the blink interval time to 500 msec for 1st LED and make it blink 2 times:
Command to send to Arduino: OUT1:500:2
Current status: OUTI blinks twice in 500 sec.intervals, turns off, OUT2 blinks four times in 1 sec intervals.
Cycle repeats
3. If any other command is entered Arduino will ignore it and do nothing.
Purchase answer to see full
attachment
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.