Working IR send / Receive class

This commit is contained in:
Siwat Sirichai 2024-01-10 19:26:00 +07:00
parent 23a2f243c9
commit 618f0b51e8
3 changed files with 33 additions and 31 deletions

View file

@ -3,13 +3,15 @@
#include <IRReceiver.hpp>
ESPMegaPRO espmega = ESPMegaPRO();
IRBlaster irBlaster = IRBlaster(14);
IRBlaster irBlaster = IRBlaster(4);
uint16_t data[] = { 2441, 579, 621, 580, 620, 580, 620, 580, 621, 579, 621, 579, 1220, 580, 1220, 580, 1247, 554, 619, 580, 621, 580, 619, 581, 619, 26392, 2420, 580, 621, 580, 620, 579, 620, 581, 619, 581, 620, 580, 1219, 581, 1220, 580, 1220, 581, 619, 580, 620, 580, 620, 580, 621, 26385, 2421, 580, 621, 580, 620, 580, 620, 579, 621, 579, 621, 579, 1221, 579, 1221, 580, 1219, 580, 621, 580, 620, 580, 621, 579, 621, 26385, 2421, 580, 621, 579, 620, 580, 620, 580, 621, 579, 621, 579, 1221, 579, 1221, 580, 1219, 580, 621, 580, 620, 580, 620, 580, 621, 26384, 2422, 580, 621, 579, 621, 579, 620, 580, 620, 580, 621, 579, 1221, 579, 1221, 580, 1220, 580, 620, 580, 620, 579, 620, 581, 620};
void setup() {
espmega.begin();
IRReceiver::begin(15);
uint16_t data[] = {100, 200, 300, 400, 500};
irBlaster.send(data, 5);
irBlaster.send(data, sizeof(data)/sizeof(uint16_t));
}
void loop() {