Question
Task 1 Build a system with six LEDs. When I flick the joystick to the right, the next LED on the right lights up while
Task 1 Build a system with six LEDs. When I flick the joystick to the right, the next LED on the right lights up while all others are off. When I flick the joystick to the left, the next to the left will light up and all others will be off. If I reach the ends on either direction, the system will just keep the last led in that direction on. Essentially we are using the joystick to move left and right.
Task 2 Additionally when I push the joystick button, the specific LED that is lit starts to blink at a rate of one second and the joystick movement is not possible during this time. When I push the joystick button again, the led stops blinking and stays on. Joystick movement should be reactivated. The button should also be debounced to prevent accidental inputs.
Task 3 Modify the system of task 1. Add a potentiometer to the system so that when any LED is blinking, the potentiometer can adjust the rate of the blinking. The potentiometer varies the rate of the blinking between 100ms and 2000ms.
This should not use the delay function, instead using millis.
Task 2 and 3 should be separate programs, but task 1 and 2 will be the same program.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started