Update README.md
This commit is contained in:
parent
90a1a843f5
commit
7b2ee9958e
10
README.md
10
README.md
|
@ -1,2 +1,10 @@
|
|||
# xmas-lights-inverted-pwm
|
||||
Run a string of Christmas lights from an Arduino
|
||||
Run one or two strings of Christmas lights from an Arduino.
|
||||
|
||||
This sketch is intended to control the type of lights that have a string of LEDs wired in reversed pairs. When current flows one way all the even LEDs light, and when the current is reversed the odd LEDs light.
|
||||
|
||||
This code attaches pairs of pins to the same PWM timer, with one pin inverted so that outputting 0-255 controls both "sides" of each string of lights. At 0 one set of LEDs is on, at 255 the other set is on. At 128, both sets are illuminated together by the — effectively — AC voltage.
|
||||
|
||||
This allows for some gentle crossfades between lights on the same string.
|
||||
|
||||
You'll need some sort of h-bridge to power the LEDs themselves, the voltage and current required would be the last thing the poor arduino ever saw ✝
|
||||
|
|
Loading…
Reference in New Issue