Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //AC remote control signal sending, the signal is this huge array. controle remoto de ar condicionado, o sinal é o array
- #include <IRremote.h>
- IRsend irsend;
- void setup()
- {
- }
- void loop() {
- int khz = 38; // 38kHz carrier frequency for the NEC protocol
- unsigned int irSignal[73] {8976, 4432, 596, 516, 12, 8, 580, 516, 608, 516, 596, 528, 588, 516, 608, 516, 596, 532, 584, 520, 604, 1640, 588, 1640, 596, 1632, 608, 1644, 584, 1640, 600, 1632, 604, 516, 600, 1632, 604, 1644, 584, 1644, 596, 528, 584, 520, 604, 516, 600, 528, 584, 520, 608, 516, 596, 528, 588, 516, 608, 1640, 584, 1644, 596, 1632, 608, 1640, 588, 1640, 596, 1632, 608, 40740, 8980, 2200, 588}; // essa string enorme é o sinal, e só vai positivo
- irsend.sendRaw(irSignal, sizeof(irSignal) / sizeof(irSignal[0]), khz); //Note the approach used to automatically calculate the size of the array. aqui você chama ela como um comando qualquer
- delay(5000); //In this example, the signal will be repeated every 5 seconds, approximately.
- }
Add Comment
Please, Sign In to add comment