Arduino sendSamsung method on IRemote library

Hello!

It's been a long time I don't work with arduino. Just found my old arduino UNO and a infrared LED. Wanted to turn my Samsung Smart TV on, but couldn't find helpful information on the web.

I've seen that they added the sendSamsung method on the IRemote library, but there isn't even an example of code for the Samsung method, just for the other methods. I just needed the power code, but I can't find it, only raw data.

I don't have the IR receiver, so it's hard for me to discover which code it is. Does anybody know a good place to find a code, or does anybody has a Samsung Smart TV and could measure the code for me?
It would be good to have sample codes for Samsung Smart TVs on the internet.

Thank you :slight_smile:

lucaszanella:
I don't have the IR receiver, so it's hard for me to discover which code it is.

You can salvage an IR receiver from almost any old home AV equipment like an old VHS VCR.

Tru the following, recorded a few signals from a Samsung just now.

/*
Automatically Generated by AnalysIR - Batch Export Utility
Registered to: xxxxxxxx
Session History
Type : Key : Value : Bits : Carrier Frequency (kHz)
0 : SAMSUNG : CH- : E0E008F7 : 32 : 38
1 : SAMSUNG : CH+ : E0E048B7 : 32 : 38
2 : SAMSUNG : VOL- : E0E0D02F : 32 : 38
3 : SAMSUNG : VOL+ : E0E0E01F : 32 : 38
4 : SAMSUNG : Power : E0E040BF : 32 : 38
Note: Be sure to use the correct Carrier frequency, for each individual signal, as(or if) indicated above
*/

// NB: Not all protocols are supported by IRremote or IRLib. You may need to edit the code below manually
// Automatically Generated by AnalysIR for xxxxxxxx, visit http://www.AnalysIR.com or email info@....... for further details
int khz=38; //NB Change this default value as neccessary to the correct carrier frequency


unsigned int Signal_CH__0[] = {4500,4500,560,1690,560,1690,560,1690,560,560,560,560,560,560,560,560,560,560,560,1690,560,1690,560,1690,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,1690,560,560,560,560,560,560,560,1690,560,1690,560,1690,560,1690,560,560,560,1690,560,1690,560,1690,560}; //AnalysIR Batch Export (IRremote) - RAW

irsend.sendRaw(Signal_CH__0, sizeof(Signal_CH__0)/sizeof(int), khz); //AnalysIR Batch Export (IRremote) - RAW
 // AnalysIR IR Protocol: SAMSUNG, Key:  CH-


unsigned int Signal_CH__1[] = {4500,4500,560,1690,560,1690,560,1690,560,560,560,560,560,560,560,560,560,560,560,1690,560,1690,560,1690,560,560,560,560,560,560,560,560,560,560,560,560,560,1690,560,560,560,560,560,1690,560,560,560,560,560,560,560,1690,560,560,560,1690,560,1690,560,560,560,1690,560,1690,560,1690,560}; //AnalysIR Batch Export (IRremote) - RAW

irsend.sendRaw(Signal_CH__1, sizeof(Signal_CH__1)/sizeof(int), khz); //AnalysIR Batch Export (IRremote) - RAW
 // AnalysIR IR Protocol: SAMSUNG, Key:  CH+


unsigned int Signal_VOL__2[] = {4500,4500,560,1690,560,1690,560,1690,560,560,560,560,560,560,560,560,560,560,560,1690,560,1690,560,1690,560,560,560,560,560,560,560,560,560,560,560,1690,560,1690,560,560,560,1690,560,560,560,560,560,560,560,560,560,560,560,560,560,1690,560,560,560,1690,560,1690,560,1690,560,1690,560,16383}; //AnalysIR Batch Export (IRremote) - RAW

irsend.sendRaw(Signal_VOL__2, sizeof(Signal_VOL__2)/sizeof(int), khz); //AnalysIR Batch Export (IRremote) - RAW
 // AnalysIR IR Protocol: SAMSUNG, Key:  VOL-


unsigned int Signal_VOL__3[] = {4500,4500,560,1690,560,1690,560,1690,560,560,560,560,560,560,560,560,560,560,560,1690,560,1690,560,1690,560,560,560,560,560,560,560,560,560,560,560,1690,560,1690,560,1690,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,1690,560,1690,560,1690,560,1690,560,1690,560}; //AnalysIR Batch Export (IRremote) - RAW

irsend.sendRaw(Signal_VOL__3, sizeof(Signal_VOL__3)/sizeof(int), khz); //AnalysIR Batch Export (IRremote) - RAW
 // AnalysIR IR Protocol: SAMSUNG, Key:  VOL+


unsigned int Signal_Power_4[] = {4500,4500,560,1690,560,1690,560,1690,560,560,560,560,560,560,560,560,560,560,560,1690,560,1690,560,1690,560,560,560,560,560,560,560,560,560,560,560,560,560,1690,560,560,560,560,560,560,560,560,560,560,560,560,560,1690,560,560,560,1690,560,1690,560,1690,560,1690,560,1690,560,1690,560}; //AnalysIR Batch Export (IRremote) - RAW

irsend.sendRaw(Signal_Power_4, sizeof(Signal_Power_4)/sizeof(int), khz); //AnalysIR Batch Export (IRremote) - RAW
 // AnalysIR IR Protocol: SAMSUNG, Key:  Power

You could also use the HEX values at the top, instead of the send RAW