The circuit shown above is a 3 pin led connected to a joystick. It uses the JoyStick movement to change the RGB values and the button press in the joystick is used to switch between states. The system has 5 states
- All off
- Red constant, change G and B by moving the joystick
- Green constant, change R and G by moving the joystick
- Blue constant, change others through joystick
- All on.
Reflection: if I were to redo this, I would transfer the states from 2, 3 and 4 making it a real color picker, and I also think the joystick button may not be ideal for an interrupt.