Super General Ac - Remote Code
// Trailer rawData[idx++] = 560; rawData[idx++] = 20000; irsend.sendRaw(rawData, idx, 38);
Serial.println(); irrecv.resume();
#include <IRremote.h> IRsend irsend(3); // IR LED on pin 3 void sendSuperGeneral(uint8_t bytes[8]) uint16_t rawData[200]; int idx = 0; // Lead code rawData[idx++] = 9000; rawData[idx++] = 4500; // For each bit of 64 bits (LSB first per byte) for (int byteIdx = 0; byteIdx < 8; byteIdx++) for (int bit = 0; bit < 8; bit++) rawData[idx++] = 560; if ((bytes[byteIdx] >> bit) & 1) rawData[idx++] = 1690; else rawData[idx++] = 565; super general ac remote code
void loop() if (irrecv.decode(&results)) // For Super General, use raw buffer (results.rawbuf) Serial.print("Raw (len="); Serial.print(results.rawlen); Serial.print("): "); for (int i=0; i<results.rawlen; i++) Serial.print(results.rawbuf[i] * MICROS_PER_TICK, DEC); Serial.print(" "); // Trailer rawData[idx++] = 560; rawData[idx++] = 20000;