Question: Part 2. Write a program that implements a simple color selector using the RGB LED Components: - 1x Joystick - 1x 10 k2 resistor (for

 Part 2. Write a program that implements a simple color selector

Part 2. Write a program that implements a simple color selector using the RGB LED Components: - 1x Joystick - 1x 10 k2 resistor (for joystick pushbutton) 1x RGB LED - 2x 220 resistors (for the LEDs) a. Connect RGB LED and joystick as follows: .. 3263TAL XFUTA TCSP O UNO . Arduino REST ANALOG IN 1222 fritzing The joystick is simply two potentiometers, one for the X axis and one for the Yaxis, set up as 0-5V voltage dividers. According to the diagram above, the x and y outputs are connected to ADC inputs 0 and 1. The joystick also has a pushbutton that we are using in part c. b. Write a program to use the joystick's displacement to gradually select the brightness (i.e., change the PWM duty cycle) of the Blue and Red LED. Green is not used in this circuit. i. Blue is controlled with the X axis of the joystick. ii. Red is controlled with the Y axis of the joystick. iii. When the joystick is centered, both LEDs are 50% on. When in top right position, both are fully on. In the lower left corner, both LEDs are off. c. Then edit the program. It should use the joystick's pushbutton to hold the LED color and print its blue and red color details to the Serial monitor. While the button is pushed, the color will not change (even if the joystick is moved), and the serial monitor will continuously print the color details

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!