So I've decided to play around with IR. I've got a VS1838 IR Receiver hooked up Arduino 1.
It's running the IRremote example SimpleReceiver. It's working. I grab a IR remote control for one of the cheap Chinese LED strips and pressing On/Off seems to show the VS1838 is working great:
15:41:20.567 -> Protocol=NEC Address=0x0 Command=0x40 Raw-Data=0xBF40FF00 32 bits LSB first Gap=3276750us Duration=68550us
15:41:20.567 -> Send with: IrSender.sendNEC(0x0, 0x40, );
15:41:20.567 ->
15:41:20.617 -> Protocol=NEC Address=0x0 Command=0x40 Repeat Gap=39500us Duration=11850us
15:41:20.617 ->
15:41:20.617 -> Repeat received. Here you can repeat the same action as before.
15:41:26.249 -> Protocol=NEC Address=0x0 Command=0x40 Raw-Data=0xBF40FF00 32 bits LSB first Gap=3276750us Duration=68500us
15:41:26.291 -> Send with: IrSender.sendNEC(0x0, 0x40, );
15:41:26.291 ->
15:41:26.313 -> Protocol=NEC Address=0x0 Command=0x40 Repeat Gap=39550us Duration=11850us
15:41:26.313 ->
15:41:26.313 -> Repeat received. Here you can repeat the same action as before.
Awesome.
Now I grab Arudino 2 and wire up the IR Tranmitter LED. And inside of IRremote Example
SimpleSender I have:
for (int i = 0; i < 100; i += 1) {
Serial.print( "Sending with repeats of: " );
Serial.println( numRepeats );
IrSender.sendNEC( 0x0, 0x40, numRepeats );
delay( 2000 );
IrSender.sendNEC( 0x0, 0x40, numRepeats );
delay(5000);
numRepeats += 1;
}
}
The numRepeats flies way up because things aren't working and I don't understand
what the proper value should be.
Anyway - the Sender seems to be working because the VS1838 sees the transmits:
15:48:20.963 -> Protocol=NEC Address=0x0 Command=0x40 Raw-Data=0xBF40FF00 32 bits LSB first Gap=3276750us Duration=68400us
15:48:20.963 -> Send with: IrSender.sendNEC(0x0, 0x40, );
15:48:20.963 ->
15:48:23.024 -> Protocol=NEC Address=0x0 Command=0x40 Raw-Data=0xBF40FF00 32 bits LSB first Gap=2000550us Duration=68450us
15:48:23.024 -> Send with: IrSender.sendNEC(0x0, 0x40, );
15:48:23.024 ->
15:48:28.105 -> Protocol=NEC Address=0x0 Command=0x40 Raw-Data=0xBF40FF00 32 bits LSB first Gap=3276750us Duration=68400us
15:48:28.105 -> Send with: IrSender.sendNEC(0x0, 0x40, );
15:48:28.105 ->
15:48:28.156 -> Protocol=NEC Address=0x0 Command=0x40 Repeat Gap=42050us Duration=11800us
15:48:28.170 ->
So - from my terribly inexperienced perspective - things are working. I'm able to transmit the same On/Off code as the remote control.
Only...
It's not.
The LED strip doesn't go on or off.
Things seems to match up, only the LED strip is not responding to my IR transmissions.
Some of the GAP values are off. Could that be my issue??? Does anyone have a suggestion on how to debug??
Thank you!