Mimicking the remote to many colored lights

Laura Bisben Amergol figured out how to programmatically control certain color light products

First install the library IRremote.h. The code below puts hexadecimal values in variables that are later used in the irsend command to transmit the signal. In this example we switch between three colors with a delay inbetween. The transmitter is am IR-led connected to pin 3.

#include<IRremote.h>
IRsend irsend;

constlong codeRED = 0xF720DF;
constlong codeGREEN = 0xF7A05F;
constlong codeBLUE = 0xF7609F;

voidsetup()
{
Serial.begin(9600);
}

voidloop()
{
irsend.sendNEC(codeRED, 32);
Serial.println(“Red”);
delay(2000); // Wait for 2 seconds

irsend.sendNEC(codeGREEN, 32);
Serial.println(“Green”);
delay(2000); // Wait for 2 seconds

irsend.sendNEC(codeBLUE, 32);
Serial.println(“Blue”);
delay(2000); // Wait for 2 seconds
}

Below is how the remote in question tend to look and with each button is the hexadecimal number that would trigger suitable color mix or function.