Question: You are to create a new application that will execute on your Arduino platform based upon the Blink example that is available in the Arduino

You are to create a new application that will execute on your Arduino platform based upon the Blink example that is available in the Arduino Examples folder that you downloaded as part of the IDE. Your application will use a toggle switch to interface with the user. The application will operate by controlling the LEDs based upon the position of the toggle switch. If the user moves the toggle switch to the "on" setting, your application will continuously blink LEDs until new user input is provided. When the user moves the toggle switch to the "off" setting, the application should stop blinking the LEDs (i.e. turn off both LEDS) until new user input is provided. It is acceptable for the current state of the LEDs to "complete" before they are turned off (this is a side-effect of using the delay() function.). However, care must be taken to avoid switch bouncing. Your application must blink the onboard LED connected to PIN 13 such that the LED is on for 1 second and off for 1 second. Also, you will construct a circuit on your breadboard that blinks an external (off- board) LED exactly out-of-phase with the onboard LED. That is, the LED on your breadboard should be off for 1 second (while the onboard LED is on) and on for 1 second (while the onboard LED is off). You are free to use any of the I/O pins available to you for your circuit. This is basically the same functionality as developed in Lab 1. The only difference is that instead of controlling the LEDs with user input from the keyboard, now you are controlling them with user input from a toggle switch. Your program should count the number of different user inputs (switch changes) and output this count to be displayed using the serial monitor. This output should only be updated when the switch setting is changed (i.e. there should not be an endless loop of count values printed to the screen). The output value should be displayed in both decimal and hexadecimal in the following format: count = (decimal) 10_(hex) A
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
