![]() |
Here’s the sketch for a red/green LED circuit where the potentiometer controls the brightness and the color change from red to green. Wire the red side of the LEDs to the "reds" pin and the green side to the "greens" (making sure they support Pulse Width Modulation on your Arduino board of choice), and hook the middle of the pot to an analog input (A0 in this case).
Could be extended easily by setting an int for granularity and dividing max_pot by that instead of by arbitrary "4" constant used in… |
You received this message because Strata Chalup shared it with . Unsubscribe from these emails. You can’t reply to this email. View the post to add a comment. |
![]() |
Leave a Reply