Project: Light up drink coaster using 8 LEDs
When a drink is placed on the coaster the 8 LEDs blink on and off one by one in a circular pattern (pins 2-9). When the drink is almost empty the coaster will stop the circular pattern and start a glowing/pulsing pattern (just fading an LED) using PWM (pin 10 to power all 8 LEDs).
The programming for these two different patterns are very simple but I am confused as to how I will switch between them. The switch in patterns will be triggered by a force sensing resistor. When the weight of the drink is below the minimum threshold then I want to switch to the glowing/pulsing pattern.
I tried wiring 2-9 to one LED each and also wiring pin 10 to every LED however this did not work. How should I approach this? I am looking for advice about how to wire this project up, I have no problems programming.
I attached a diagram of how I tried to wire the LEDs up (I only did 3 instead of all 8 but it is the same idea for all). If you need any clarification just ask, I’m pretty new to this so my explanation might not be the best.
Thanks for any help!