Generation

generate functionTue, 17 Jan 2023

SUBARU 433MHZ

void transmitCode(unsigned long data, unsigned int nBits) { unsigned long mask; data = data << (32 - nBits); mask = 1UL << (nBits - 1); irsend.enableIROut(38); while (mask) { if (data & mask) { irsend.mark(444); irsend.space(1110); } else { irsend.mark(444); irsend.space(333); } mask >>= 1; } irsend.mark(444); irsend.space(0); }

Questions about programming?Chat with your personal AI assistant