void loop() {
//if (Serial.read() != -1) {
for (int i = 0; i < 30; i++) {
irsend.sendSony(C_On, 36); // Sony TV power code
delay(2000);
irsend.sendSony(C_Off, 36); // Sony TV power code
}
//}
}
Shouldn't the nbits value be 32 for these codes? ie like this:
void loop() {
//if (Serial.read() != -1) {
for (int i = 0; i < 30; i++) {
irsend.sendSony(C_On, 32); // Sony TV power code
delay(2000);
irsend.sendSony(C_Off, 32); // Sony TV power code
}
//}
}
But how to say to irsend class that I have connected the IR LED to the 13 pin?
The IR LED MUST be connected to pin 3. Sending data requires modulating the IR LED, and that requires a timer. The timer is tied to the hardware - pin 3.
You can't use any old pin to SEND data. You can use any old pin to READ data.
I connect to pin3, the IR LED does not seems to emit any light (may be is too fast, my mobile phone camera does not detect it, but detects the light of original IR remote).
but no action with cooler. (IR LED connected to PIN 3)
i have made a test with IR LED (a simple digitalWrite(13, HIGH); to test it and see the light with mobile phone camera, it looks like nice violet color light.