Skip to content

Instantly share code, notes, and snippets.

//
// Arduino serial-interface for controlling the ws2812 leds. The serial interface is based on the
// Adalight protocol. The protocol is as follows:
// [prefix][led count][checksum][red, green, blue]*
// prefix := 'Ada'
// led count := number of leds - 1 (uint16_t big endian)
// checksum := led count high bit XOR led count low bit XOR 0x55 (uint8_t)
// red, green, blue := channel intensity [0-255] (uint8_t)
//