Skip to content

LED candles

alastaira edited this page Oct 18, 2024 · 3 revisions

I bought a load of these remote control battery-powered LED candles: https://www.amazon.co.uk/dp/B07KJGZ3FN

They are activated via an infrared remote control, and I captured the following control codes using the Arduino-IRremote library. It uses the RC5 protocol, which inverts a toggle bit each time a new key is pressed (to distinguish between a long held key press and a double key press). The "command" itself is just the second byte:

Key Code Function Example Send Code
ON1 0x1009/0x1809 Turn on, flickering IrSender.sendRC5(0x0, 0x9, <numberOfRepeats>);
ON2 0x1001/0x1801 Turn on, solid IrSender.sendRC5(0x0, 0x1, <numberOfRepeats>);
- 0x100A/0x180A Dim brightness IrSender.sendRC5(0x0, 0xA, <numberOfRepeats>);
+ 0x100B/0x180B Increase brightness IrSender.sendRC5(0x0, 0xB, <numberOfRepeats>);
SL 0x100C/0x180C Slow flicker speed IrSender.sendRC5(0x0, 0xC, <numberOfRepeats>);
FL 0x1002/0x1802 Fast flicker speed IrSender.sendRC5(0x0, 0x2, <numberOfRepeats>);
OFF 0x1008/0x1808 Turn off IrSender.sendRC5(0x0, 0x8, <numberOfRepeats>);

Another batch I bought were a different style and use the NEC code (32bits, LSB first), as follows:

Key Code Function Example Send Code
ON 0x00 Turn on IrSender.sendNEC(0x0, 0x0, <numberOfRepeats>);
OFF 0x2 Turn off IrSender.sendNEC(0x0, 0x2, <numberOfRepeats>);
4H 0x4 4h Timer IrSender.sendNEC(0x0, 0x4, <numberOfRepeats>);
6H 0x6 6h Timer IrSender.sendNEC(0x0, 0x6, <numberOfRepeats>);
FLF 0x8 Flicker Fast IrSender.sendNEC(0x0, 0x8, <numberOfRepeats>);
Light 0xA Solid Light IrSender.sendNEC(0x0, 0xA, <numberOfRepeats>);
SL 0xC Slow Flicker IrSender.sendNEC(0x0, 0xC, <numberOfRepeats>);
FL 0xE Fast Flicker IrSender.sendNEC(0x0, 0xE, <numberOfRepeats>);
- 0x10 Dim IrSender.sendNEC(0x0, 0x10, <numberOfRepeats>);
+ 0x12 Brighten IrSender.sendNEC(0x0, 0x12, <numberOfRepeats>);
Clone this wiki locally