Howdy Folks,
Brand-newby here. Seems like maybe I bit off more that I can handle, but I'm not one to give up. Yet.
I have an art project that requires 3 separate circuits of LEDs to be individually controlled by one remote. One circuit is a rgb addressable strip LED kit with IR remote. Another is a mini LED 'fairy light' string (on/off switch). Lastly, I have a harness of 8 individual 2.5mm 'twinkling' LEDs. I want to re-purpose two buttons on the the strip kit remote to simply toggle on/off and provide power to each of the other 2 circuits.
Here's some initial particulars:
LED strip kit runs on 12v with a power adapter (output rated at 5amps).
Fairy lights and twinklers both run on 3.3v .
Purchased several 12v,5v,3v3 power modules (12v input). [Good thing I bought multiples as I burned out the first 2 with excessive amps! Found another power adapter with proper mAh.]
I felt like the most practical method was to pass 12v straight through the power module to the strip light's board and use the 3v3 power-out pins for the other 2 circuits. I glued the strip board and power module to a solderable breadboard and installed header pins for permanent connections. Once I got past the over-current issues the lights work/look great! At this point however only the rgb strip was controlled by its remote.
Over the past several weeks I've been learning to write sketches for Arduino Uno but I don't have room to simply install the Uno on the project and let it do the work. I do have room on the breadboard for an ATtiny85 so I've learned to program ATtiny with Arduino as ISP. Truthfully, I haven't learned much C++ yet so I've taken most of my info and examples from Arduino community and other online resources.
My current sketch compiles and uploads to ATtiny without issue. It all looks great - it just doesn't respond to the IR codes received.
My wiring hookups correspond to the standard schematics for programming Attiny85. As follows:
ATtiny Pin: Arduino Uno Pin: Prototyping Breadboard:
Reset PB5 (1) to 10
Analog PB3 (2) " unused
Analog PB4 (3) " signal pin on IR (vs1838) ("RECV_PIN" in my sketch)
GND (4) " breadboard gnd
MOSI PB0 (5) " 11 (output "LED1" in sketch)
MISO PB1 (6) " 12 (output "LED2")
SCK PB2 (7) " 13
VCC (8) " breadboard voltage
Also: 5V to breadboard
GND " "
GND to RESET w/ 10µf cap
33µf cap across +/- columns
PB0 (5) ----------------------------------------------- jumper to an LED
(to observe LED1 output)
PB1 (6) ----------------------------------------------- jumper to an LED
(to observe LED2 output)
After many corrections my sketch compiles and uploads without issue. NOTE: The Tx/Rx LEDs on
Uno are of course an easy way to watch as the sketch uploads to ATtiny85, but I can also see the same activity on the observance LEDs I installed on the breadboard.
So, my problem is that it just doesn't work. The DIY4 and DIY5 remote buttons do not produce any effect at all. I've retested to verify IR function and correct codes (NEC format). I've tried each of the 3 different numbers describing ATtiny85 pinouts (e.g., PB0, 0, and 5).
Checked and triple-checked everything... I feel like I'm so close and yet, I'm lost.
Please help.
Sketch is attached.
Thank You Very Much.
Paul
sketch_jan15b_IR_Remote_ATtiny.ino (1.58 KB)
