IR ovladač
Úvodní stránka › Fórum › Vaše projekty › Arduino › IR ovladač
- Toto téma obsahuje celkem 12 odpovědí. Do diskuze (3 diskutující) se naposledy zapojil uživatel
mitch a poslední změna proběhla před 8 roky a 3 měsíci.
-
AutorPříspěvky
-
11.5.2016 v 23:18 #6847
mitch
ÚčastníkZdravím,
jsem u Arduina nový. Mám následující myšlenku.
Mám televizní ovladač kde když zmáčknu např. tlačítko PLAY tak Arduino přijme kód tlačítka a následně ho vyšle dál, ale pozměněný. Tedy přijmu PLAY z TV ovladače, ale naklonovaný signál PLAY tlačítka od SetTopBoxu.
Když použiji tento kód:#include <IRremote.h> unsigned int srBlue[67] = {8950, 4350, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1600, 650, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1600, 650, 450, 650, 500, 600, 500, 600, 500, 600, 1600, 600, 1600, 650, 450, 650, 500, 600, 500, 600, 1600, 600, 1600, 650, 1600, 600, 500, 600, 500, 600, 1600, 650, 1600, 600, 1600, 650}; // NEC 20218E7 unsigned int srYellow[67] = {8950, 4300, 650, 450, 650, 450, 700, 400, 700, 400, 700, 400, 700, 400, 700, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 700, 400, 700, 400, 700, 1550, 650, 450, 650, 1550, 700, 400, 700, 400, 700, 1550, 650, 1550, 700, 400, 700, 400, 700, 400, 700, 450, 650, 1550, 650, 1550, 700, 400, 700, 400, 700, 1550, 650, 1550, 700, 1550, 650}; // NEC 2029867 unsigned int srMute[67] = {8900, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 650, 450, 650, 1550, 650, 1600, 600, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 1600, 600, 500, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650}; // NEC 20230CF unsigned int srPlay[67] = {9000, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 500, 600, 500, 600, 1600, 650, 450, 650, 1550, 650, 450, 650, 500, 600, 500, 650, 1550, 650, 1550, 650, 450, 700, 1550, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 20228D7 IRsend irsend; void setup() { Serial.begin(9600); } String r = ""; void loop() { if (Serial.available() > 0) { // read the incoming byte: r = Serial.readString(); // say what you got: Serial.print("I received: "); Serial.print(r); if (r.indexOf("p") > -1) { Serial.println("Play"); irsend.sendRaw(srPlay, 67, 38); } } }
Tak STB reaguje normálně. Tedy pošlu mu přes serial monitor znak „p“ a provede se odeslání. Tedy STB začne buď hrát nebo se pauzne.
Pokud, ale použiji tento kód kde již přijímám kód z TV ovladače tak se stane to, že kód z TV ovladače to pozná dobře, ale již nevyšle kód pro STB. Když tlačítko na TV ovladači mačkám opakovaně tak třeba až na několikátý pokus to STB přijme. Zkoušel jsem i přes FOR udělat cyklus, že bych odeslání třeba 2x zopakoval, ale na to někdy STB zareagoval jedním přijetí, ale také dvěma.
Dokáže mi někdo poradit kde dělám chybu?#include <IRremote.h> int RECV_PIN = 11; int ledPin = 13; int ledState = LOW; // STB unsigned int srPower[67] = {8950, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 600, 1600, 650, 450, 650, 1550, 650, 500, 600, 500, 600, 500, 600, 500, 650, 1550, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650}; // NEC 20250AF #define sPower 0x20250AF unsigned int srMute[67] = {8900, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 650, 450, 650, 1550, 650, 1600, 600, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 1600, 600, 500, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650}; // NEC 20230CF #define sMute 0x20230CF unsigned int srHelp[67] = {8950, 4350, 600, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 450, 650, 1600, 650, 1550, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 700, 400, 650, 500, 600, 1600, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 202F00F #define sHelp 0x202F00F unsigned int sr1[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650}; // NEC 202807F #define s1 0x202807F unsigned int sr2[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 1600, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 600}; // NEC 20240BF #define s2 0x20240BF unsigned int sr3[67] = {8950, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 1600, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 202C03F #define s3 0x202C03F unsigned int sr4[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650, 1600, 650}; // NEC 20220DF #define s4 0x20220DF unsigned int sr5[67] = {8950, 4300, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 600, 1600, 650, 450, 650, 1600, 600, 500, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 600, 1600, 650}; // NEC 202A05F #define s5 0x202A05F unsigned int sr6[67] = {8900, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 600, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 600}; // NEC 202609F #define s6 0x202609F unsigned int sr7[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650, 1600, 650}; // NEC 202E01F #define s7 0x202E01F unsigned int sr8[67] = {8950, 4350, 600, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 1600, 650, 1550, 650, 450, 650, 1600, 650, 1550, 650, 1600, 600, 1600, 650}; // NEC 20210EF #define s8 0x20210EF unsigned int sr9[67] = {8900, 4350, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1650, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1600, 650, 500, 600, 1600, 600, 500, 600, 500, 600, 1600, 650, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1600, 650, 1600, 600, 500, 600, 1600, 600, 1600, 650, 1600, 600, 1600, 650}; // NEC 202906F #define s9 0x202906F unsigned int sr0[67] = {8950, 4300, 650, 450, 650, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 600, 1600, 650}; // NEC 20200FF #define s0 0x20200FF unsigned int srDisplay[67] = {8950, 4300, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 650, 1550, 650, 450, 650, 1600, 600, 500, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 1550, 650, 450, 650, 1600, 650, 1550, 650, 1550, 650, 500, 600, 1600, 650}; // NEC 202A25D #define sDisplay 0x202A25D unsigned int srClear[67] = {8950, 4350, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1600, 650, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1600, 650, 500, 600, 1600, 600, 500, 600, 1600, 650, 1600, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 600, 500, 650, 450, 600, 1600, 650, 1600, 600, 1600, 650}; // NEC 202B847 #define sClear 0x202B847 unsigned int srCPlus[67] = {8900, 4350, 600, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 1600, 600, 500, 600, 500, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 600, 1600, 650, 450, 650, 1600, 600, 1600, 650, 1600, 600, 1600, 600, 500, 650, 1600, 600}; // NEC 20242BD #define sCPlus 0x20242BD unsigned int srCMinus[67] = {8950, 4350, 650, 450, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 500, 600, 1600, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 20258A7 #define sCMinus 0x20258A7 unsigned int srExit[67] = {8900, 4350, 600, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 600, 1600, 650, 450, 650, 1550, 650}; // NEC 20202FD #define sExit 0x20202FD unsigned int srBack[67] = {8900, 4350, 650, 450, 650, 450, 650, 450, 600, 500, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 600, 1600, 650, 500, 600, 1600, 600, 500, 650, 450, 600, 500, 600, 500, 650, 450, 650, 1600, 600, 500, 600, 500, 600, 1600, 600, 1650, 600, 1600, 600, 1600, 650, 1600, 600, 500, 650, 1550, 650}; // NEC 202827D #define sBack 0x202827D unsigned int srUp[67] = {8950, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 1600, 650, 1550, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 600, 1600, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 202D02F #define sUp 0x202D02F unsigned int srDown[67] = {8950, 4300, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 650, 1550, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1550, 650, 500, 600, 500, 600, 500, 600, 500, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 600, 1600, 650}; // NEC 202708F #define sDown 0x202708F unsigned int srLeft[67] = {8950, 4350, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 600, 1600, 600, 500, 600, 1600, 650, 1600, 600, 1600, 650}; // NEC 20208F7 #define sLeft 0x20208F7 unsigned int srRight[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 1600, 650, 1550, 650, 1600, 600}; // NEC 2028877 #define sRight 0x2028877 unsigned int srOK[67] = {8900, 4350, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 600, 500, 650, 450, 650, 1600, 600, 500, 650, 1550, 650, 450, 650, 1600, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650}; // NEC 202B04F #define sOK 0x202B04F unsigned int srPPlus[67] = {8950, 4350, 600, 500, 600, 500, 650, 450, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650}; // NEC 202A857 #define sPPlus 0x202A857 unsigned int srPMinus[67] = {8900, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 600, 500, 600, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 20238C7 #define sPMinus 0x20238C7 unsigned int srVPlus[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 600}; // NEC 202F807 #define sVPlus 0x202F807 unsigned int srVMinus[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 1600, 600, 1600, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650}; // NEC 2027887 #define sVMinus 0x2027887 unsigned int srRed[67] = {8950, 4350, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 2026897 #define sRed 0x2026897 unsigned int srGreen[67] = {8900, 4350, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 550, 550, 1650, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1650, 600, 500, 600, 1600, 600, 1650, 600, 1600, 650, 450, 650, 1600, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1600, 650, 500, 600, 1600, 650, 1550, 650, 1600, 650}; // NEC 202E817 #define sGreen 0x202E817 unsigned int srBlue[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 700, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 1600, 650, 1550, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650}; // NEC 20218E7 #define sBlue 0x20218E7 unsigned int srYellow[67] = {8950, 4300, 650, 450, 650, 450, 700, 400, 650, 450, 650, 450, 700, 400, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 700, 400, 700, 400, 650, 1600, 650, 450, 650, 1550, 650, 450, 650, 450, 700, 1550, 650, 1550, 650, 450, 700, 400, 700, 400, 650, 450, 650, 1600, 650, 1550, 650, 450, 700, 400, 650, 1600, 650, 1550, 650, 1600, 600}; // NEC 2029867 #define sYellow 0x2029867 unsigned int srMenu[67] = {8950, 4300, 650, 450, 700, 400, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 700, 400, 700, 400, 650, 450, 700, 400, 700, 450, 600, 500, 600, 1600, 650, 450, 650, 450, 700, 1550, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 700, 400, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650}; // NEC 20248B7 #define sMenu 0x20248B7 unsigned int srRev[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 700, 400, 700, 400, 700, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 600, 500, 600, 500, 650, 1550, 650, 450, 650, 450, 650, 450, 700, 400, 650, 450, 650, 1600, 650, 1550, 700, 400, 700, 1550, 650, 1550, 650, 1600, 600}; // NEC 202C837 #define sRev 0x202C837 unsigned int srFwd[67] = {8900, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 650, 1550, 650, 1550, 650, 450, 650, 1600, 650, 1550, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 600, 1600, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 202D827 #define sFwd 0x202D827 unsigned int srPlay[67] = {9000, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 500, 600, 500, 600, 1600, 650, 450, 650, 1550, 650, 450, 650, 500, 600, 500, 650, 1550, 650, 1550, 650, 450, 700, 1550, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 20228D7 #define sPlay 0x20228D7 unsigned int srStop[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 450, 700, 400, 650, 450, 700, 1550, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 1600, 600}; // NEC 20222DD #define sStop 0x20222DD unsigned int srSubtitle[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 600, 500, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 1600, 650, 450, 650, 1600, 600, 1600, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 1600, 650, 450, 650, 1550, 650, 450, 650, 1600, 650}; // NEC 202CA35 #define sSubtitle 0x202CA35 unsigned int srAudio[67] = {8900, 4350, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1650, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1650, 550, 550, 600, 1600, 600, 1650, 550, 550, 600, 1600, 600, 1600, 600, 500, 600, 1650, 550, 550, 600, 500, 600, 500, 600, 1650, 550, 550, 550, 550, 550, 1650, 600, 500, 600, 1650, 550}; // NEC 202DA25 #define sAudio 0x202DA25 unsigned int srRec[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 700, 400, 700, 400, 700, 450, 650, 1550, 650, 450, 650, 450, 700, 400, 700, 400, 700, 400, 700, 400, 700, 400, 700, 1550, 650, 450, 650, 1550, 700, 1550, 650, 1550, 650, 450, 700, 1550, 600, 500, 650, 1550, 650, 450, 700, 400, 700, 400, 700, 400, 650, 1600, 650, 450, 650, 1550, 650, 450, 700, 1550, 650}; // NEC 202EA15 #define sRec 0x202EA15 unsigned int srGoto[67] = {8950, 4300, 700, 400, 700, 400, 700, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 700, 400, 700, 400, 700, 400, 700, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 700, 400, 700, 400, 700, 1550, 650, 450, 650, 1550, 700, 400, 700, 1550, 650, 450, 650, 1550, 700, 1550, 650, 450, 650, 1550, 650, 450, 650, 1550, 700, 450, 650, 1550, 650}; // NEC 2022AD5 #define sGoto 0x2022AD5 // TV unsigned int trPower[67] = {4550, 4400, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 650, 450, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 500, 650, 1550, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650}; // SAMSUNG E0E040BF #define tPower 0xE0E040BF unsigned int trPowerS[67] = {4500, 4450, 600, 1600, 600, 1650, 550, 1650, 600, 500, 600, 550, 550, 550, 550, 550, 600, 500, 600, 1650, 550, 1650, 600, 1650, 550, 550, 550, 550, 600, 500, 600, 550, 550, 550, 550, 550, 600, 500, 600, 550, 550, 550, 550, 550, 600, 1650, 550, 1650, 550, 1650, 600, 1650, 550, 1650, 600, 1650, 550, 1650, 600, 1650, 550, 550, 550, 550, 600, 500, 600}; // SAMSUNG E0E007F8 #define tPowerS 0xE0E007F8 unsigned int trSource[67] = {4600, 4350, 650, 1600, 650, 1550, 700, 1550, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650}; // SAMSUNG E0E0807F #define tSource 0xE0E0807F unsigned int tr1[67] = {4600, 4350, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650}; // SAMSUNG E0E020DF #define t1 0xE0E020DF unsigned int tr2[67] = {4550, 4400, 650, 1550, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650}; // SAMSUNG E0E0A05F #define t2 0xE0E0A05F unsigned int tr3[67] = {4600, 4350, 650, 1550, 650, 1600, 600, 1600, 650, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 1600, 650, 1600, 650, 450, 650, 450, 650, 500, 600, 500, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650}; // SAMSUNG E0E0609F #define t3 0xE0E0609F unsigned int tr4[67] = {4550, 4400, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 600, 500, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650}; // SAMSUNG E0E010EF #define t4 0xE0E010EF unsigned int tr5[67] = {4600, 4350, 700, 1550, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 700, 1550, 650, 1550, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 1600, 600, 1600, 650, 1550, 650, 1600, 650}; // SANYO FFFFFFFF #define t5 0xFFFFFFFF unsigned int tr6[67] = {4600, 4350, 650, 1600, 600, 1600, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1600, 600, 1600, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650}; // SAMSUNG E0E050AF #define t6 0xE0E050AF unsigned int tr7[67] = {4550, 4400, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 500, 600, 500, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 450, 650, 500, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650}; // SAMSUNG E0E030CF #define t7 0xE0E030CF unsigned int tr8[67] = {4600, 4350, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650}; // SAMSUNG E0E0B04F #define t8 0xE0E0B04F unsigned int tr9[67] = {4550, 4400, 600, 1600, 650, 1600, 600, 1600, 650, 450, 650, 500, 600, 500, 600, 500, 650, 450, 650, 1600, 600, 1600, 650, 1600, 600, 500, 600, 500, 600, 500, 650, 500, 600, 500, 600, 500, 650, 1600, 600, 1600, 650, 1600, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1650, 600, 500, 600, 500, 600, 550, 600, 1600, 600, 1650, 600, 1600, 600, 1600, 600}; // SAMSUNG E0E0708F #define t9 0xE0E0708F unsigned int tr0[67] = {4500, 4400, 650, 1600, 600, 1600, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 500, 600, 500, 600, 1600, 650, 1600, 600, 1600, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 500, 600, 1600, 650, 450, 650, 450, 650, 500, 600, 500, 600, 1600, 650, 1600, 650, 1550, 650, 500, 600, 1600, 650, 1550, 650, 1600, 650}; // SAMSUNG E0E08877 #define t0 0xE0E08877 unsigned int trTTX[67] = {4600, 4350, 650, 1600, 650, 1550, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1600, 650, 450, 650, 1550, 650, 500, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650}; // SAMSUNG E0E034CB #define tTTX 0xE0E034CB unsigned int trPRECH[67] = {4550, 4400, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 700, 400, 650, 500, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650}; // SAMSUNG E0E0C837 #define tPRECH 0xE0E0C837 unsigned int trMute[67] = {4550, 4350, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 650, 450, 650, 450, 650, 1600, 600, 1600, 650, 1600, 650, 1550, 650}; // SAMSUNG E0E0F00F #define tMute 0xE0E0F00F unsigned int trVPlus[67] = {4600, 4350, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650}; // SAMSUNG E0E0E01F #define tVPlus 0xE0E0E01F unsigned int trVMinus[67] = {4600, 4350, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 500, 650, 450, 600, 500, 650, 450, 650, 1600, 600, 1600, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1600, 600, 1600, 650, 1550, 650, 1600, 650}; // SAMSUNG E0E0D02F #define tVMinus 0xE0E0D02F unsigned int trPPlus[67] = {4600, 4350, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650}; // SAMSUNG E0E048B7 #define tPPlus 0xE0E048B7 unsigned int trPMinus[67] = {4550, 4400, 650, 1550, 650, 1600, 600, 1600, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 1600, 650, 1550, 650, 1550, 650}; // SAMSUNG E0E008F7 #define tPMinus 0xE0E008F7 unsigned int trCHlist[67] = {4550, 4400, 650, 1550, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 1600, 600, 1600, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1600, 600, 500, 650, 1550, 650, 450, 650, 1600, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 500, 600, 500, 650, 1550, 650}; // SAMSUNG E0E0D629 #define tCHlist 0xE0E0D629 unsigned int trMenu[67] = {4550, 4400, 650, 1550, 700, 1550, 650, 1550, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650}; // SAMSUNG E0E058A7 #define tMenu 0xE0E058A7 unsigned int trSmart[67] = {4600, 4350, 650, 1600, 650, 1550, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 500, 650, 1550, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650}; // SAMSUNG E0E09E61 #define tSmart 0xE0E09E61 unsigned int trGuide[67] = {4550, 4400, 650, 1550, 650, 1600, 600, 1600, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1600, 600, 1600, 650, 1600, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1600, 650, 450, 650, 1550, 650}; // SAMSUNG E0E0F20D #define tGuide 0xE0E0F20D unsigned int trTools[67] = {4550, 4400, 650, 1600, 600, 1600, 650, 1600, 600, 500, 600, 500, 650, 450, 650, 500, 600, 500, 600, 1600, 650, 1600, 600, 1600, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 600, 1650, 600, 1600, 650, 500, 550, 1650, 600, 500, 650, 450, 600, 1650, 600, 500, 600, 500, 600, 550, 600, 1600, 600, 500, 600, 1650, 600, 1600, 650, 450, 600, 1650, 600}; // SAMSUNG E0E0D22D #define tTools 0xE0E0D22D unsigned int trInfo[67] = {4550, 4400, 650, 1550, 650, 1550, 650, 1600, 650, 450, 700, 400, 650, 500, 650, 450, 650, 450, 650, 1600, 600, 1600, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1600, 650, 1550, 650}; // SAMSUNG E0E0F807 #define tInfo 0xE0E0F807 unsigned int trUp[67] = {4550, 4400, 600, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 1600, 600, 1600, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 500, 650, 450, 650, 1550, 650}; // SAMSUNG E0E006F9 #define tUp 0xE0E006F9 unsigned int trDown[67] = {4550, 4350, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 450, 650, 1600, 600}; // SAMSUNG E0E08679 #define tDown 0xE0E08679 unsigned int trLeft[67] = {4600, 4350, 650, 1550, 650, 1600, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 600, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 450, 650, 500, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 1600, 650}; // SAMSUNG E0E0A659 #define tLeft 0xE0E0A659 unsigned int trRight[67] = {4500, 4450, 600, 1650, 550, 1650, 600, 1650, 550, 550, 550, 550, 550, 550, 600, 500, 600, 550, 550, 1650, 600, 1650, 550, 1650, 600, 500, 600, 550, 550, 550, 550, 550, 600, 500, 550, 600, 550, 1650, 550, 550, 550, 550, 600, 550, 550, 1650, 600, 1650, 550, 550, 550, 1650, 600, 550, 550, 1650, 550, 1700, 550, 1650, 550, 550, 550, 550, 600, 1650, 550}; // SAMSUNG E0E046B9 #define tRight 0xE0E046B9 unsigned int trOK[67] = {4550, 4350, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 1600, 650, 1550, 700, 1550, 650, 450, 650, 1550, 650, 500, 600, 500, 650, 1550, 650}; // SAMSUNG E0E016E9 #define tOK 0xE0E016E9 unsigned int trReturn[67] = {4600, 4350, 650, 1600, 650, 1550, 700, 1550, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 700, 450, 650, 450, 650, 450, 700, 1550, 650, 1550, 650, 450, 700, 1550, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 500, 650, 450, 650, 1550, 650, 500, 650, 1550, 650}; // SAMSUNG E0E01AE5 #define tReturn 0xE0E01AE5 unsigned int trExit[67] = {4600, 4350, 650, 1600, 600, 1600, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 500, 600, 500, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650}; // SAMSUNG E0E0B44B #define tExit 0xE0E0B44B unsigned int trRed[67] = {4600, 4350, 650, 1600, 650, 1550, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 1600, 600, 1600, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1600, 650}; // SAMSUNG E0E036C9 #define tRed 0xE0E036C9 unsigned int trGreen[67] = {4600, 4350, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 500, 650, 1550, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 1550, 650, 500, 650, 1550, 700, 1550, 650, 1550, 650}; // SAMSUNG E0E028D7 #define tGreen 0xE0E028D7 unsigned int trYellow[67] = {4600, 4350, 650, 1600, 600, 1600, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 500, 650, 1550, 650, 450, 650, 500, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650}; // SAMSUNG E0E0A857 #define tYellow 0xE0E0A857 unsigned int trBlue[67] = {4550, 4400, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 700, 1550, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 700, 400, 650, 1600, 650, 450, 650, 1600, 600, 1600, 650, 1550, 650}; // SAMSUNG E0E06897 #define tBlue 0xE0E06897 unsigned int trRev[67] = {4550, 4400, 650, 1600, 600, 1600, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 600, 1600, 650, 1600, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 600, 1600, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1600, 650, 450, 700, 1550, 650, 1550, 700, 1500, 650, 500, 650, 1550, 700}; // SAMSUNG E0E0A25D #define tRev 0xE0E0A25D unsigned int trFwd[67] = {4550, 4400, 650, 1550, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1600, 650, 1550, 650, 1550, 650, 500, 650, 1550, 650, 1600, 650, 450, 650, 1550, 650}; // SAMSUNG E0E012ED #define tFwd 0xE0E012ED unsigned int trPause[67] = {4550, 4400, 650, 1600, 600, 1600, 650, 1600, 600, 500, 600, 500, 650, 450, 600, 550, 600, 500, 600, 1600, 650, 1600, 600, 1600, 650, 450, 600, 550, 600, 500, 600, 500, 600, 500, 600, 550, 600, 1600, 600, 500, 600, 1650, 600, 500, 600, 500, 600, 1650, 600, 500, 600, 1600, 600, 550, 600, 1600, 600, 500, 600, 1650, 600, 1600, 600, 550, 550, 1650, 600}; // SAMSUNG E0E052AD #define tPause 0xE0E052AD unsigned int trPlay[67] = {4600, 4350, 650, 1600, 650, 1550, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1600, 650, 1550, 650, 450, 700, 400, 700, 450, 650, 450, 650, 450, 700, 1550, 650, 1550, 700, 1550, 650, 450, 650, 450, 700, 400, 700, 1550, 650, 450, 650, 450, 700, 450, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 1600, 650}; // SAMSUNG E0E0E21D #define tPlay 0xE0E0E21D unsigned int trRec[67] = {4550, 4400, 600, 1600, 600, 1600, 650, 1600, 600, 500, 600, 500, 650, 450, 650, 500, 600, 500, 600, 1600, 650, 1600, 600, 1600, 650, 450, 650, 500, 600, 500, 600, 500, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 1600, 600, 500, 600, 500, 650, 1600, 600, 1600, 650, 450, 650, 1600, 600, 1600, 650, 500, 600, 1600, 600}; // SAMSUNG E0E0926D #define tRec 0xE0E0926D unsigned int trStop[67] = {4500, 4400, 650, 1600, 600, 1600, 600, 1650, 550, 550, 550, 550, 600, 500, 600, 550, 550, 550, 550, 1650, 550, 1700, 550, 1650, 550, 600, 550, 550, 550, 550, 550, 550, 550, 550, 600, 550, 550, 1650, 600, 1650, 550, 550, 550, 550, 600, 500, 600, 1650, 550, 550, 600, 1650, 550, 550, 600, 500, 600, 1600, 600, 1650, 600, 1600, 600, 550, 600, 1600, 600}; // SAMSUNG E0E0629D #define tStop 0xE0E0629D // Definice IR IRrecv irrecv(RECV_PIN); IRsend irsend; decode_results results; long lastDebounceTime = 0; long debounceDelay = 500; void setup() { Serial.begin(9600); irrecv.enableIRIn(); // Start the receiver pinMode(ledPin, OUTPUT); digitalWrite(ledPin, ledState); } void loop() { // if (lastDebounceTime > 0 && millis() > lastDebounceTime) { // //irrecv.enableIRIn(); // lastDebounceTime = 0; // Serial.println("Nasloucham"); // } if (irrecv.decode(&results)) { Serial.print("Prijato: "); Serial.println(results.value, HEX); if (results.value == tYellow) { Serial.println("Odesilam prikaz: Yellow"); irsend.sendRaw(srYellow, 67, 32); //lastDebounceTime = millis() + debounceDelay; } if (results.value == tBlue) { Serial.println("Odesilam prikaz: Blue"); irsend.sendRaw(srBlue, 67, 32); //lastDebounceTime = millis() + debounceDelay; } if (results.value == tPlay) { Serial.println("Odesilam prikaz: Play"); for (int i = 0; i < 1; i++) { irsend.sendRaw(srPlay, 67, 38); Serial.print("Odesilam pokus: "); Serial.println(i); delay(50); } //lastDebounceTime = millis() + debounceDelay; } irrecv.enableIRIn(); irrecv.resume(); // Receive the next value } }
Zapojení vysílací IR led mám toto:
Díky moc za rady…
Attachments:
12.5.2016 v 7:58 #6851taunt
ÚčastníkDobrý den,
Kdysi jsem podobný případ rěšil ještě s klasickými obvody, ne s Ardem.
Zkoušel jsem všechno možné, až jsem zjistil, že to vůbec nebylo v „překladači.
Protože jsem neměl odstíněný koncový přijímač kódu od IR signálu výchozího ovladače, koncový přijímač zblbnul, protože se často překrýval signál z ovladače s „přeloženým“ signálem z „překladeče“. U IR je to docela problém. Zkus si najednou použít ovladač třeba od TV a SAT a uvidiš.12.5.2016 v 17:36 #6852mitch
ÚčastníkTak máš asi nejspíš pravdu… Problém je, že ten STB má asi nějakou extrémně citlivou přijímací diodu takže budu muset vymyslet dokonalé odstínění abych ověřil tuto teorii, ale dle zběžných pokusů to tak asi je 🙂
12.5.2016 v 21:16 #6853posjirka
Účastníknavrhoval bych po detekci signálu z DO udělat pauzu třeba 2s a pak terpve vyslat serii nového signálu. A to třeba 3x.
15.5.2016 v 20:36 #6879mitch
ÚčastníkTak pauza před odeslání je asi to pravé řešení. Stačí dát delay(100); a už to odesílá. Nyní jsem ale narazil na jiný problém a to:
Projekt zabírá 14 692 bytů (47%) úložného místa pro program. Maximum je 30 720 bytů. Globální proměnné zabírají 3 924 bytů (191%) dynamické paměti, -1 876 bytů zůstává pro lokální proměnné. Maximum je 2 048 bytů. processing.app.debug.RunnerException: Nedostatek peměti;
Aktuální kód je tento:
#include <IRremote.h> // Deklarace pinů int RECV_PIN = 11; // STB const unsigned int srPower[67] = {8950, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 600, 1600, 650, 450, 650, 1550, 650, 500, 600, 500, 600, 500, 600, 500, 650, 1550, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650}; // NEC 20250AF const unsigned int srMute[67] = {8900, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 650, 450, 650, 1550, 650, 1600, 600, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 1600, 600, 500, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650}; // NEC 20230CF const unsigned int srHelp[67] = {8950, 4350, 600, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 450, 650, 1600, 650, 1550, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 700, 400, 650, 500, 600, 1600, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 202F00F const unsigned int sr1[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650}; // NEC 202807F const unsigned int sr2[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 1600, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 600}; // NEC 20240BF const unsigned int sr3[67] = {8950, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 1600, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 202C03F const unsigned int sr4[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650, 1600, 650}; // NEC 20220DF const unsigned int sr5[67] = {8950, 4300, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 600, 1600, 650, 450, 650, 1600, 600, 500, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 600, 1600, 650}; // NEC 202A05F const unsigned int sr6[67] = {8900, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 600, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 600}; // NEC 202609F const unsigned int sr7[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650, 1600, 650}; // NEC 202E01F const unsigned int sr8[67] = {8950, 4350, 600, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 1600, 650, 1550, 650, 450, 650, 1600, 650, 1550, 650, 1600, 600, 1600, 650}; // NEC 20210EF const unsigned int sr9[67] = {8900, 4350, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1650, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1600, 650, 500, 600, 1600, 600, 500, 600, 500, 600, 1600, 650, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1600, 650, 1600, 600, 500, 600, 1600, 600, 1600, 650, 1600, 600, 1600, 650}; // NEC 202906F const unsigned int sr0[67] = {8950, 4300, 650, 450, 650, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 600, 1600, 650}; // NEC 20200FF const unsigned int srDisplay[67] = {8950, 4300, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 650, 1550, 650, 450, 650, 1600, 600, 500, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 1550, 650, 450, 650, 1600, 650, 1550, 650, 1550, 650, 500, 600, 1600, 650}; // NEC 202A25D const unsigned int srClear[67] = {8950, 4350, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1600, 650, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1600, 650, 500, 600, 1600, 600, 500, 600, 1600, 650, 1600, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 600, 500, 650, 450, 600, 1600, 650, 1600, 600, 1600, 650}; // NEC 202B847 const unsigned int srPUp[67] = {8900, 4350, 600, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 1600, 600, 500, 600, 500, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 600, 1600, 650, 450, 650, 1600, 600, 1600, 650, 1600, 600, 1600, 600, 500, 650, 1600, 600}; // NEC 20242BD const unsigned int srPDown[67] = {8950, 4350, 650, 450, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 500, 600, 1600, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 20258A7 const unsigned int srExit[67] = {8900, 4350, 600, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 600, 1600, 650, 450, 650, 1550, 650}; // NEC 20202FD const unsigned int srBack[67] = {8900, 4350, 650, 450, 650, 450, 650, 450, 600, 500, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 600, 1600, 650, 500, 600, 1600, 600, 500, 650, 450, 600, 500, 600, 500, 650, 450, 650, 1600, 600, 500, 600, 500, 600, 1600, 600, 1650, 600, 1600, 600, 1600, 650, 1600, 600, 500, 650, 1550, 650}; // NEC 202827D const unsigned int srUp[67] = {8950, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 1600, 650, 1550, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 600, 1600, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 202D02F const unsigned int srDown[67] = {8950, 4300, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 650, 1550, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1550, 650, 500, 600, 500, 600, 500, 600, 500, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 600, 1600, 650}; // NEC 202708F const unsigned int srLeft[67] = {8950, 4350, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 600, 1600, 600, 500, 600, 1600, 650, 1600, 600, 1600, 650}; // NEC 20208F7 const unsigned int srRight[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 1600, 650, 1550, 650, 1600, 600}; // NEC 2028877 const unsigned int srOK[67] = {8900, 4350, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 600, 500, 650, 450, 650, 1600, 600, 500, 650, 1550, 650, 450, 650, 1600, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650}; // NEC 202B04F const unsigned int srPPlus[67] = {8950, 4350, 600, 500, 600, 500, 650, 450, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650}; // NEC 202A857 const unsigned int srPMinus[67] = {8900, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 600, 500, 600, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 20238C7 const unsigned int srVPlus[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 600}; // NEC 202F807 const unsigned int srVMinus[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 1600, 600, 1600, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650}; // NEC 2027887 const unsigned int srRed[67] = {8950, 4350, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 2026897 const unsigned int srGreen[67] = {8900, 4350, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 550, 550, 1650, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1650, 600, 500, 600, 1600, 600, 1650, 600, 1600, 650, 450, 650, 1600, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1600, 650, 500, 600, 1600, 650, 1550, 650, 1600, 650}; // NEC 202E817 const unsigned int srBlue[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 700, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 1600, 650, 1550, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650}; // NEC 20218E7 const unsigned int srYellow[67] = {8950, 4300, 650, 450, 650, 450, 700, 400, 650, 450, 650, 450, 700, 400, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 700, 400, 700, 400, 650, 1600, 650, 450, 650, 1550, 650, 450, 650, 450, 700, 1550, 650, 1550, 650, 450, 700, 400, 700, 400, 650, 450, 650, 1600, 650, 1550, 650, 450, 700, 400, 650, 1600, 650, 1550, 650, 1600, 600}; // NEC 2029867 const unsigned int srMenu[67] = {8950, 4300, 650, 450, 700, 400, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 700, 400, 700, 400, 650, 450, 700, 400, 700, 450, 600, 500, 600, 1600, 650, 450, 650, 450, 700, 1550, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 700, 400, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650}; // NEC 20248B7 const unsigned int srRev[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 700, 400, 700, 400, 700, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 600, 500, 600, 500, 650, 1550, 650, 450, 650, 450, 650, 450, 700, 400, 650, 450, 650, 1600, 650, 1550, 700, 400, 700, 1550, 650, 1550, 650, 1600, 600}; // NEC 202C837 const unsigned int srFwd[67] = {8900, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 650, 1550, 650, 1550, 650, 450, 650, 1600, 650, 1550, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 600, 1600, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 202D827 const unsigned int srPlay[67] = {9000, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 500, 600, 500, 600, 1600, 650, 450, 650, 1550, 650, 450, 650, 500, 600, 500, 650, 1550, 650, 1550, 650, 450, 700, 1550, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 20228D7 const unsigned int srStop[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 450, 700, 400, 650, 450, 700, 1550, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 1600, 600}; // NEC 20222DD const unsigned int srSubtitle[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 600, 500, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 1600, 650, 450, 650, 1600, 600, 1600, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 1600, 650, 450, 650, 1550, 650, 450, 650, 1600, 650}; // NEC 202CA35 const unsigned int srAudio[67] = {8900, 4350, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1650, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1650, 550, 550, 600, 1600, 600, 1650, 550, 550, 600, 1600, 600, 1600, 600, 500, 600, 1650, 550, 550, 600, 500, 600, 500, 600, 1650, 550, 550, 550, 550, 550, 1650, 600, 500, 600, 1650, 550}; // NEC 202DA25 const unsigned int srRec[67] = {8950, 4300, 650, 450, 650, 450, 650, 450, 700, 400, 700, 400, 700, 450, 650, 1550, 650, 450, 650, 450, 700, 400, 700, 400, 700, 400, 700, 400, 700, 400, 700, 1550, 650, 450, 650, 1550, 700, 1550, 650, 1550, 650, 450, 700, 1550, 600, 500, 650, 1550, 650, 450, 700, 400, 700, 400, 700, 400, 650, 1600, 650, 450, 650, 1550, 650, 450, 700, 1550, 650}; // NEC 202EA15 const unsigned int srGoto[67] = {8950, 4300, 700, 400, 700, 400, 700, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 700, 400, 700, 400, 700, 400, 700, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 700, 400, 700, 400, 700, 1550, 650, 450, 650, 1550, 700, 400, 700, 1550, 650, 450, 650, 1550, 700, 1550, 650, 450, 650, 1550, 650, 450, 650, 1550, 700, 450, 650, 1550, 650}; // NEC 2022AD5 // TV #define tPower 0xE0E040BF #define tPowerS 0xE0E007F8 #define tSource 0xE0E0807F #define t1 0xE0E020DF #define t2 0xE0E0A05F #define t3 0xE0E0609F #define t4 0xE0E010EF #define t5 0xFFFFFFFF #define t6 0xE0E050AF #define t7 0xE0E030CF #define t8 0xE0E0B04F #define t9 0xE0E0708F #define t0 0xE0E08877 #define tTTX 0xE0E034CB #define tPRECH 0xE0E0C837 #define tMute 0xE0E0F00F #define tVUp 0xE0E0E01F #define tVDown 0xE0E0D02F #define tPUp 0xE0E048B7 #define tPDown 0xE0E008F7 #define tCHlist 0xE0E0D629 #define tMenu 0xE0E058A7 #define tSmart 0xE0E09E61 #define tGuide 0xE0E0F20D #define tTools 0xE0E0D22D #define tInfo 0xE0E0F807 #define tUp 0xE0E006F9 #define tDown 0xE0E08679 #define tLeft 0xE0E0A659 #define tRight 0xE0E046B9 #define tOK 0xE0E016E9 #define tReturn 0xE0E01AE5 #define tExit 0xE0E0B44B #define tRed 0xE0E036C9 #define tGreen 0xE0E028D7 #define tYellow 0xE0E0A857 #define tBlue 0xE0E06897 #define tRev 0xE0E0A25D #define tFwd 0xE0E012ED #define tPause 0xE0E052AD #define tPlay 0xE0E0E21D #define tRec 0xE0E0926D #define tStop 0xE0E0629D // Definice IR IRrecv irrecv(RECV_PIN); IRsend irsend; decode_results results; // Proměnné void setup() { Serial.begin(9600); irrecv.enableIRIn(); // Start the receiver } void loop() { // Rozpoznání přijatého kódu if (irrecv.decode(&results)) { Serial.print("Prijato: "); Serial.println(results.value, HEX); delay(100); // Zpožděné odeslání switch (results.value) { case tRed: irsend.sendRaw(srRed, 67, 38); break; case tGreen: irsend.sendRaw(srGreen, 67, 38); break; case tYellow: irsend.sendRaw(srYellow, 67, 38); break; case tBlue: irsend.sendRaw(srBlue, 67, 38); break; case tUp: irsend.sendRaw(srUp, 67, 38); break; case tDown: irsend.sendRaw(srDown, 67, 38); break; case tLeft: irsend.sendRaw(srLeft, 67, 38); break; case tRight: irsend.sendRaw(srRight, 67, 38); break; case tOK: irsend.sendRaw(srOK, 67, 38); break; case t1: irsend.sendRaw(sr1, 67, 38); break; case t2: irsend.sendRaw(sr2, 67, 38); break; case t3: irsend.sendRaw(sr3, 67, 38); break; case t4: irsend.sendRaw(sr4, 67, 38); break; case t5: irsend.sendRaw(sr5, 67, 38); break; case t6: irsend.sendRaw(sr6, 67, 38); break; case t7: irsend.sendRaw(sr7, 67, 38); break; case t8: irsend.sendRaw(sr8, 67, 38); break; case t9: irsend.sendRaw(sr9, 67, 38); break; case t0: irsend.sendRaw(sr0, 67, 38); break; case tPUp: irsend.sendRaw(srPUp, 67, 38); break; case tPDown: irsend.sendRaw(srPDown, 67, 38); break; case tPlay: irsend.sendRaw(srPlay, 67, 38); break; case tPause: irsend.sendRaw(srPlay, 67, 38); break; case tStop: irsend.sendRaw(srStop, 67, 38); break; case tRev: irsend.sendRaw(srRev, 67, 38); break; case tFwd: irsend.sendRaw(srFwd, 67, 38); break; case tRec: irsend.sendRaw(srRec, 67, 38); break; } irrecv.enableIRIn(); irrecv.resume(); // Receive the next value } }
Neřekl bych, že je tam toho moc? Trochu to nechápu. U každého case jsem měl Serial.println(„Nejaky text“); po odstranění těchto debug informací se velikost globálních proměnných snížila, ale nevím jak to snížit dále?
15.5.2016 v 21:18 #6880posjirka
Účastníkzásadní problém je těch 41 polí po 67 znacích. To že je to integer je 67x41x2 byty = 5494 bytu po optimalizaci kodu od IDE ti pak spadne na konečných cca 3900 bytu.
máš několik možností:
– buď použít jiný procesor, který má víc RAM
– před tyto konstanty použij funkci PROGMEM
https://www.arduino.cc/en/Reference/PROGMEM
zjednodušeně : to ti přenese tyto konstanty do paměti pro program (pokud není plná)
– použij aliasy (pro každé z unikátních hodnot pole přiřaď číslo typu byte a pak se na ně odkaž, sníží ti to zatížení téměř na polovinu) = změn typ pole na byte
– použij SD kartu pro nahrání těchto vysílacích kodu
– nejde použít některá z funkcí knihovny irremote?15.5.2016 v 23:52 #6883mitch
ÚčastníkKoukám, že se ohledně Arduina mám ještě hodně co učit 🙂 momentálně jsem spadnul pomocí PROGMEM na nějakých 440bytů 🙂
Zatím díky moc 🙂16.5.2016 v 21:04 #6906posjirka
Účastníknení zač. Sice spadne velikost proměnných, ale zvětší se ti velikost programu ! na to pozor. Tady máš místa dost, až budeš na hraně bude to horší. Je lepší používat větší procesor (arduino MEGA není špatná volba)
17.5.2016 v 12:04 #6907mitch
ÚčastníkAbych to shrnul 🙂
Chci poděkovat všem za cenné rady. Prvním problémem bylo skutečně ovlivňování signálů. Čili tam pomohlo vysílaný signál zpozdit o 100ms.
Ohledně paměti pomohlo přenést vysílací kódy pomocí PROGMEM.
Nyní jsem s pamětí takto:Projekt zabírá 22 790 bytů (74%) úložného místa pro program. Maximum je 30 720 bytů. Globální proměnné zabírají 816 bytů (39%) dynamické paměti, 1 232 bytů zůstává pro lokální proměnné. Maximum je 2 048 bytů.
Celé to funguje tak, že při spuštěné TV (signál z USB od TV do Arduina). Automaticky se zapne LED páska za TV a vyšle se Power kód pro STB.
Jinak mám STB značky Hybroad Z205. Je to kabelový STB pro IPTV. Při vypnutí TV se opět vyšle kód na vypnutí STB.
Dále to překládá kódy z ovladače pro Samsung TV a posílá je do STB. Na TV jsem nastavil funkci univerzálního dálkového ovladače, ale protože tento můj STB není v seznamu tak jsem zvolil libovolný, aby si TV myslela, že tam je a např. barevný tlačítka nereagovaly a nezobrazovala se hláška „Není k dispozici“.
Dále tam mám BT modul HC-06, přes který se dá jak TV tak i STB ovládat z telefonu.
Kód může být pro někoho prasárna, ale je to první funkční projekt 🙂
Schéma zapojení dodám, až ho nakreslím.A nakonec samotný kód, pokud by se někomu hodil 🙂
#include <IRremote.h> // Deklarace pinů #define RECV_PIN 11 #define TVpin 2 #define LEDpin 5 #define tvLEDpin 13 // STB const unsigned int srPower[67] PROGMEM = {8950, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 600, 1600, 650, 450, 650, 1550, 650, 500, 600, 500, 600, 500, 600, 500, 650, 1550, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650}; // NEC 20250AF const unsigned int srMute[67] PROGMEM = {8900, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 650, 450, 650, 1550, 650, 1600, 600, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 1600, 600, 500, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650}; // NEC 20230CF const unsigned int srHelp[67] PROGMEM = {8950, 4350, 600, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 450, 650, 1600, 650, 1550, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 700, 400, 650, 500, 600, 1600, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 202F00F const unsigned int sr1[67] PROGMEM = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650}; // NEC 202807F const unsigned int sr2[67] PROGMEM = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 1600, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 600}; // NEC 20240BF const unsigned int sr3[67] PROGMEM = {8950, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 1600, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 202C03F const unsigned int sr4[67] PROGMEM = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650, 1600, 650}; // NEC 20220DF const unsigned int sr5[67] PROGMEM = {8950, 4300, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 600, 1600, 650, 450, 650, 1600, 600, 500, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 600, 1600, 650}; // NEC 202A05F const unsigned int sr6[67] PROGMEM = {8900, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 600, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 600}; // NEC 202609F const unsigned int sr7[67] PROGMEM = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650, 1600, 650}; // NEC 202E01F const unsigned int sr8[67] PROGMEM = {8950, 4350, 600, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 1600, 650, 1550, 650, 450, 650, 1600, 650, 1550, 650, 1600, 600, 1600, 650}; // NEC 20210EF const unsigned int sr9[67] PROGMEM = {8900, 4350, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1650, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1600, 650, 500, 600, 1600, 600, 500, 600, 500, 600, 1600, 650, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1600, 650, 1600, 600, 500, 600, 1600, 600, 1600, 650, 1600, 600, 1600, 650}; // NEC 202906F const unsigned int sr0[67] PROGMEM = {8950, 4300, 650, 450, 650, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 600, 1600, 650}; // NEC 20200FF const unsigned int srDisplay[67] PROGMEM = {8950, 4300, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 650, 1550, 650, 450, 650, 1600, 600, 500, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 1550, 650, 450, 650, 1600, 650, 1550, 650, 1550, 650, 500, 600, 1600, 650}; // NEC 202A25D const unsigned int srClear[67] PROGMEM = {8950, 4350, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1600, 650, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1600, 650, 500, 600, 1600, 600, 500, 600, 1600, 650, 1600, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 600, 500, 650, 450, 600, 1600, 650, 1600, 600, 1600, 650}; // NEC 202B847 const unsigned int srPUp[67] PROGMEM = {8900, 4350, 600, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 1600, 600, 500, 600, 500, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 600, 1600, 650, 450, 650, 1600, 600, 1600, 650, 1600, 600, 1600, 600, 500, 650, 1600, 600}; // NEC 20242BD const unsigned int srPDown[67] PROGMEM = {8950, 4350, 650, 450, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 500, 600, 1600, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 20258A7 const unsigned int srExit[67] PROGMEM = {8900, 4350, 600, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 600, 1600, 650, 450, 650, 1550, 650}; // NEC 20202FD const unsigned int srBack[67] PROGMEM = {8900, 4350, 650, 450, 650, 450, 650, 450, 600, 500, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 600, 1600, 650, 500, 600, 1600, 600, 500, 650, 450, 600, 500, 600, 500, 650, 450, 650, 1600, 600, 500, 600, 500, 600, 1600, 600, 1650, 600, 1600, 600, 1600, 650, 1600, 600, 500, 650, 1550, 650}; // NEC 202827D const unsigned int srUp[67] PROGMEM = {8950, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 1600, 650, 1550, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 600, 1600, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 202D02F const unsigned int srDown[67] PROGMEM = {8950, 4300, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 650, 1550, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1550, 650, 500, 600, 500, 600, 500, 600, 500, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 600, 1600, 650}; // NEC 202708F const unsigned int srLeft[67] PROGMEM = {8950, 4350, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 600, 1600, 600, 500, 600, 1600, 650, 1600, 600, 1600, 650}; // NEC 20208F7 const unsigned int srRight[67] PROGMEM = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 1600, 650, 1550, 650, 1600, 600}; // NEC 2028877 const unsigned int srOK[67] PROGMEM = {8900, 4350, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 600, 500, 650, 450, 650, 1600, 600, 500, 650, 1550, 650, 450, 650, 1600, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650}; // NEC 202B04F const unsigned int srPPlus[67] PROGMEM = {8950, 4350, 600, 500, 600, 500, 650, 450, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650}; // NEC 202A857 const unsigned int srPMinus[67] PROGMEM = {8900, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 600, 500, 600, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 20238C7 const unsigned int srVPlus[67] PROGMEM = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 1550, 650, 1600, 600, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 600}; // NEC 202F807 const unsigned int srVMinus[67] PROGMEM = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 1600, 600, 1600, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650}; // NEC 2027887 const unsigned int srMenu[67] PROGMEM = {8950, 4300, 650, 450, 700, 400, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 700, 400, 700, 400, 650, 450, 700, 400, 700, 450, 600, 500, 600, 1600, 650, 450, 650, 450, 700, 1550, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 700, 400, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650}; // NEC 20248B7 const unsigned int srRev[67] PROGMEM = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 700, 400, 700, 400, 700, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 600, 500, 600, 500, 650, 1550, 650, 450, 650, 450, 650, 450, 700, 400, 650, 450, 650, 1600, 650, 1550, 700, 400, 700, 1550, 650, 1550, 650, 1600, 600}; // NEC 202C837 const unsigned int srFwd[67] PROGMEM = {8900, 4350, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 650, 1550, 650, 1550, 650, 450, 650, 1600, 650, 1550, 650, 450, 650, 450, 650, 500, 600, 500, 600, 500, 600, 1600, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 202D827 const unsigned int srPlay[67] PROGMEM = {9000, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 500, 600, 500, 600, 1600, 650, 450, 650, 1550, 650, 450, 650, 500, 600, 500, 650, 1550, 650, 1550, 650, 450, 700, 1550, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 20228D7 const unsigned int srStop[67] PROGMEM = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 450, 700, 400, 650, 450, 700, 1550, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 1600, 600}; // NEC 20222DD const unsigned int srSubtitle[67] PROGMEM = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 600, 500, 600, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 600, 1600, 650, 450, 650, 1600, 600, 1600, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 1600, 650, 450, 650, 1550, 650, 450, 650, 1600, 650}; // NEC 202CA35 const unsigned int srAudio[67] PROGMEM = {8900, 4350, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1650, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1650, 550, 550, 600, 1600, 600, 1650, 550, 550, 600, 1600, 600, 1600, 600, 500, 600, 1650, 550, 550, 600, 500, 600, 500, 600, 1650, 550, 550, 550, 550, 550, 1650, 600, 500, 600, 1650, 550}; // NEC 202DA25 const unsigned int srRec[67] PROGMEM = {8950, 4300, 650, 450, 650, 450, 650, 450, 700, 400, 700, 400, 700, 450, 650, 1550, 650, 450, 650, 450, 700, 400, 700, 400, 700, 400, 700, 400, 700, 400, 700, 1550, 650, 450, 650, 1550, 700, 1550, 650, 1550, 650, 450, 700, 1550, 600, 500, 650, 1550, 650, 450, 700, 400, 700, 400, 700, 400, 650, 1600, 650, 450, 650, 1550, 650, 450, 700, 1550, 650}; // NEC 202EA15 const unsigned int srGoto[67] PROGMEM = {8950, 4300, 700, 400, 700, 400, 700, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 700, 400, 700, 400, 700, 400, 700, 450, 650, 450, 650, 450, 650, 1550, 650, 450, 700, 400, 700, 400, 700, 1550, 650, 450, 650, 1550, 700, 400, 700, 1550, 650, 450, 650, 1550, 700, 1550, 650, 450, 650, 1550, 650, 450, 650, 1550, 700, 450, 650, 1550, 650}; // NEC 2022AD5 const unsigned int srRed[67] PROGMEM = {8950, 4350, 600, 500, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 500, 600, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 450, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 1550, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650}; // NEC 2026897 const unsigned int srGreen[67] PROGMEM = {8900, 4350, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 550, 550, 1650, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1650, 600, 500, 600, 1600, 600, 1650, 600, 1600, 650, 450, 650, 1600, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1600, 650, 500, 600, 1600, 650, 1550, 650, 1600, 650}; // NEC 202E817 const unsigned int srBlue[67] PROGMEM = {8950, 4300, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 700, 1550, 650, 450, 650, 450, 650, 450, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 1600, 600, 1600, 650, 1550, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650}; // NEC 20218E7 const unsigned int srYellow[67] PROGMEM = {8950, 4300, 650, 450, 650, 450, 700, 400, 650, 450, 650, 450, 700, 400, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 450, 700, 400, 700, 400, 650, 1600, 650, 450, 650, 1550, 650, 450, 650, 450, 700, 1550, 650, 1550, 650, 450, 700, 400, 700, 400, 650, 450, 650, 1600, 650, 1550, 650, 450, 700, 400, 650, 1600, 650, 1550, 650, 1600, 600}; // NEC 2029867 // TV #define tPower 0xE0E040BF #define tPowerS 0xE0E007F8 #define tSource 0xE0E0807F #define t1 0xE0E020DF #define t2 0xE0E0A05F #define t3 0xE0E0609F #define t4 0xE0E010EF #define t5 0xE0E0906F #define t6 0xE0E050AF #define t7 0xE0E030CF #define t8 0xE0E0B04F #define t9 0xE0E0708F #define t0 0xE0E08877 #define tTTX 0xE0E034CB #define tPRECH 0xE0E0C837 #define tMute 0xE0E0F00F #define tVUp 0xE0E0E01F #define tVDown 0xE0E0D02F #define tPUp 0xE0E048B7 #define tPDown 0xE0E008F7 #define tCHlist 0xE0E0D629 #define tMenu 0xE0E058A7 #define tSmart 0xE0E09E61 #define tGuide 0xE0E0F20D #define tTools 0xE0E0D22D #define tInfo 0xE0E0F807 #define tUp 0xE0E006F9 #define tDown 0xE0E08679 #define tLeft 0xE0E0A659 #define tRight 0xE0E046B9 #define tOK 0xE0E016E9 #define tReturn 0xE0E01AE5 #define tExit 0xE0E0B44B #define tRev 0xE0E0A25D #define tFwd 0xE0E012ED #define tPause 0xE0E052AD #define tPlay 0xE0E0E21D #define tRec 0xE0E0926D #define tStop 0xE0E0629D #define tRed 0xE0E036C9 #define tGreen 0xE0E028D7 #define tYellow 0xE0E0A857 #define tBlue 0xE0E06897 const unsigned int trPower[67] PROGMEM = {4550, 4400, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 650, 450, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 500, 650, 1550, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650}; // SAMSUNG E0E040BF const unsigned int trSource[67] PROGMEM = {4600, 4350, 650, 1600, 650, 1550, 700, 1550, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650}; // SAMSUNG E0E0807F const unsigned int trMute[67] PROGMEM = {4550, 4350, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 650, 450, 650, 450, 650, 1600, 600, 1600, 650, 1600, 650, 1550, 650}; // SAMSUNG E0E0F00F const unsigned int trVUp[67] PROGMEM = {4600, 4350, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 600, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650}; // SAMSUNG E0E0E01F const unsigned int trVDown[67] PROGMEM = {4600, 4350, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 500, 650, 450, 600, 500, 650, 450, 650, 1600, 600, 1600, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1600, 600, 1600, 650, 1550, 650, 1600, 650}; // SAMSUNG E0E0D02F const unsigned int trMenu[67] PROGMEM = {4550, 4400, 650, 1550, 700, 1550, 650, 1550, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650}; // SAMSUNG E0E058A7 const unsigned int trSmart[67] PROGMEM = {4600, 4350, 650, 1600, 650, 1550, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 500, 650, 1550, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650}; // SAMSUNG E0E09E61 const unsigned int trTools[67] PROGMEM = {4550, 4400, 650, 1600, 600, 1600, 650, 1600, 600, 500, 600, 500, 650, 450, 650, 500, 600, 500, 600, 1600, 650, 1600, 600, 1600, 650, 450, 650, 500, 600, 500, 600, 500, 600, 500, 600, 1650, 600, 1600, 650, 500, 550, 1650, 600, 500, 650, 450, 600, 1650, 600, 500, 600, 500, 600, 550, 600, 1600, 600, 500, 600, 1650, 600, 1600, 650, 450, 600, 1650, 600}; // SAMSUNG E0E0D22D const unsigned int trUp[67] PROGMEM = {4550, 4400, 600, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 1600, 600, 1600, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 500, 650, 450, 650, 1550, 650}; // SAMSUNG E0E006F9 const unsigned int trDown[67] PROGMEM = {4550, 4350, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 1600, 600, 1600, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 450, 650, 1600, 600}; // SAMSUNG E0E08679 const unsigned int trLeft[67] PROGMEM = {4600, 4350, 650, 1550, 650, 1600, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 600, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 450, 650, 500, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 1600, 650}; // SAMSUNG E0E0A659 const unsigned int trRight[67] PROGMEM = {4500, 4450, 600, 1650, 550, 1650, 600, 1650, 550, 550, 550, 550, 550, 550, 600, 500, 600, 550, 550, 1650, 600, 1650, 550, 1650, 600, 500, 600, 550, 550, 550, 550, 550, 600, 500, 550, 600, 550, 1650, 550, 550, 550, 550, 600, 550, 550, 1650, 600, 1650, 550, 550, 550, 1650, 600, 550, 550, 1650, 550, 1700, 550, 1650, 550, 550, 550, 550, 600, 1650, 550}; // SAMSUNG E0E046B9 const unsigned int trOK[67] PROGMEM = {4550, 4350, 650, 1600, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 1600, 650, 1550, 700, 1550, 650, 450, 650, 1550, 650, 500, 600, 500, 650, 1550, 650}; // SAMSUNG E0E016E9 const unsigned int trReturn[67] PROGMEM = {4600, 4350, 650, 1600, 650, 1550, 700, 1550, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 700, 450, 650, 450, 650, 450, 700, 1550, 650, 1550, 650, 450, 700, 1550, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 500, 650, 450, 650, 1550, 650, 500, 650, 1550, 650}; // SAMSUNG E0E01AE5 const unsigned int trExit[67] PROGMEM = {4600, 4350, 650, 1600, 600, 1600, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 500, 600, 500, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1550, 650, 1600, 650}; // SAMSUNG E0E0B44B const unsigned int trRev[67] PROGMEM = {4550, 4400, 650, 1600, 600, 1600, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 600, 1600, 650, 1600, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 600, 1600, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1600, 650, 450, 700, 1550, 650, 1550, 700, 1500, 650, 500, 650, 1550, 700}; // SAMSUNG E0E0A25D const unsigned int trFwd[67] PROGMEM = {4550, 4400, 650, 1550, 650, 1550, 650, 1600, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 1600, 650, 1550, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 450, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 450, 650, 1600, 650, 450, 650, 1600, 650, 1550, 650, 1550, 650, 500, 650, 1550, 650, 1600, 650, 450, 650, 1550, 650}; // SAMSUNG E0E012ED const unsigned int trPause[67] PROGMEM = {4550, 4400, 650, 1600, 600, 1600, 650, 1600, 600, 500, 600, 500, 650, 450, 600, 550, 600, 500, 600, 1600, 650, 1600, 600, 1600, 650, 450, 600, 550, 600, 500, 600, 500, 600, 500, 600, 550, 600, 1600, 600, 500, 600, 1650, 600, 500, 600, 500, 600, 1650, 600, 500, 600, 1600, 600, 550, 600, 1600, 600, 500, 600, 1650, 600, 1600, 600, 550, 550, 1650, 600}; // SAMSUNG E0E052AD const unsigned int trPlay[67] PROGMEM = {4600, 4350, 650, 1600, 650, 1550, 650, 1550, 650, 500, 650, 450, 650, 450, 650, 450, 650, 500, 650, 1550, 650, 1600, 650, 1550, 650, 450, 700, 400, 700, 450, 650, 450, 650, 450, 700, 1550, 650, 1550, 700, 1550, 650, 450, 650, 450, 700, 400, 700, 1550, 650, 450, 650, 450, 700, 450, 650, 450, 650, 1550, 650, 1600, 650, 1550, 650, 450, 650, 1600, 650}; // SAMSUNG E0E0E21D const unsigned int trStop[67] PROGMEM = {4500, 4400, 650, 1600, 600, 1600, 600, 1650, 550, 550, 550, 550, 600, 500, 600, 550, 550, 550, 550, 1650, 550, 1700, 550, 1650, 550, 600, 550, 550, 550, 550, 550, 550, 550, 550, 600, 550, 550, 1650, 600, 1650, 550, 550, 550, 550, 600, 500, 600, 1650, 550, 550, 600, 1650, 550, 550, 600, 500, 600, 1600, 600, 1650, 600, 1600, 600, 550, 600, 1600, 600}; // SAMSUNG E0E0629D // Definice IR IRrecv irrecv(RECV_PIN); IRsend irsend; decode_results results; // Proměnné bool doSTB = 1; bool doSTBlast = 1; bool TVstate = 0; long TVstateChange = 0; int LEDstate = 0; unsigned long LEDdelay = 5 * 60 * 1000; String BTin = ""; boolean BTok = false; void setup() { Serial.begin(9600); irrecv.enableIRIn(); // Start the receiver pinMode(TVpin, INPUT); pinMode(LEDpin, OUTPUT); analogWrite(LEDpin, LEDstate); pinMode(tvLEDpin, OUTPUT); digitalWrite(tvLEDpin, LOW); BTin.reserve(20); if (digitalRead(TVpin)) { TVstate = 1; LEDstate = 255; analogWrite(LEDpin, LEDstate); } } void loop() { // Rozsvítí kontrolku když jde ovládání jen do TV // ----------------------------------------------------------------- if (doSTB != doSTBlast) { if (doSTB == 0) { digitalWrite(tvLEDpin, HIGH); } else { digitalWrite(tvLEDpin, LOW); } doSTBlast = doSTB; } // Detekce vypnuté/zapnuté TV // ----------------------------------------------------------------- if (digitalRead(TVpin) != TVstate) { //Serial.print(F("Aktualni stav TV: ")); //Serial.println(digitalRead(TVpin)); TVstate = digitalRead(TVpin); if (digitalRead(TVpin)) { LEDstate = 255; TVstateChange = 0; } else { TVstateChange = millis() + LEDdelay; } Serial.print(TVstate); Serial.print(F("|")); Serial.println(LEDstate); analogWrite(LEDpin, LEDstate); Odeslat(srPower, "Vypinam/zapinam STB"); } // Zpožděné vypnutí LED if (TVstateChange > 0 && millis() > TVstateChange) { LEDstate = 0; TVstateChange = 0; analogWrite(LEDpin, LEDstate); Serial.print(TVstate); Serial.print(F("|")); Serial.println(LEDstate); } if (BTok) { //Serial.print(F("Prijaty prikaz z BT: ")); //Serial.println(BTin); // Změna intenzity led if (BTin.indexOf("led=") > -1) { LEDstate = BTin.substring(BTin.indexOf("=") + 1).toInt(); analogWrite(LEDpin, LEDstate); } if (BTin == "Connected") { // Když se připojí BT Serial.print(TVstate); Serial.print(F("|")); Serial.println(LEDstate); } else if (BTin == "Red") { Odeslat(srRed, "srRed"); } else if (BTin == "Green") { Odeslat(srGreen, "srGreen"); } else if (BTin == "Yellow") { Odeslat(srYellow, "srYellow"); } else if (BTin == "Blue") { Odeslat(srBlue, "srBlue"); } else if (BTin == "PowerTV") { Odeslat(trPower, "trPower"); } else if (BTin == "Source") { doSTB = 0; Odeslat(trSource, "trSource"); } else if (BTin == "PowerSTB") { Odeslat(srPower, "srPower"); } else if (BTin == "1") { Odeslat(sr1, "sr1"); } else if (BTin == "2") { Odeslat(sr2, "sr2"); } else if (BTin == "3") { Odeslat(sr3, "sr3"); } else if (BTin == "4") { Odeslat(sr4, "sr4"); } else if (BTin == "5") { Odeslat(sr5, "sr5"); } else if (BTin == "6") { Odeslat(sr6, "sr6"); } else if (BTin == "7") { Odeslat(sr7, "sr7"); } else if (BTin == "8") { Odeslat(sr8, "sr8"); } else if (BTin == "9") { Odeslat(sr9, "sr9"); } else if (BTin == "0") { Odeslat(sr0, "sr0"); } else if (BTin == "VUp") { Odeslat(trVUp, "trVUp"); } else if (BTin == "VDown") { Odeslat(trVDown, "trVDown"); } else if (BTin == "PUp") { Odeslat(srPUp, "srPUp"); } else if (BTin == "PDown") { Odeslat(srPDown, "srPDown"); } else if (BTin == "Mute") { Odeslat(trMute, "trMute"); } else if (BTin == "Smart") { doSTB = 0; Odeslat(trSmart, "trSmart"); } else if (BTin == "Tools") { doSTB = 0; Odeslat(trTools, "trTools"); } else if (BTin == "Menu") { doSTB = 0; Odeslat(trMenu, "trMenu"); } else if (BTin == "Return") { Odeslat(trReturn, "trReturn"); } else if (BTin == "Exit") { doSTB = 1; Odeslat(trExit, "trExit"); } else if (BTin == "Up") { if (doSTB) { Odeslat(srUp, "srUp"); } else { Odeslat(trUp, "trUp"); } } else if (BTin == "Down") { if (doSTB) { Odeslat(srDown, "srDown"); } else { Odeslat(trDown, "trDown"); } } else if (BTin == "Left") { if (doSTB) { Odeslat(srLeft, "srLeft"); } else { Odeslat(trLeft, "trLeft"); } } else if (BTin == "Right") { if (doSTB) { Odeslat(srRight, "srRight"); } else { Odeslat(trRight, "trRight"); } } else if (BTin == "OK") { if (doSTB) { Odeslat(srOK, "srOK"); } else { Odeslat(trOK, "trOK"); } } else if (BTin == "Rev") { if (doSTB) { Odeslat(srRev, "srRev"); } else { Odeslat(trRev, "trRev"); } } else if (BTin == "Play") { if (doSTB) { Odeslat(srPlay, "srPlay"); } else { Odeslat(trPlay, "trPlay"); } } else if (BTin == "Pause") { if (doSTB) { Odeslat(srPlay, "srPlay"); } else { Odeslat(trPause, "trPause"); } } else if (BTin == "Fwd") { if (doSTB) { Odeslat(srFwd, "srFwd"); } else { Odeslat(trFwd, "trFwd"); } } else if (BTin == "Stop") { if (doSTB) { Odeslat(srStop, "srStop"); } else { Odeslat(trStop, "trStop"); } } else if (BTin == "Rec") { Odeslat(srRec, "srRec"); } BTin = ""; BTok = false; } // Rozpoznání přijatého kódu // ----------------------------------------------------------------- if (irrecv.decode(&results)) { //Serial.print(F("Prijato: ")); //Serial.println(results.value, HEX); switch (results.value) { case tYellow: Odeslat(srYellow, "srYellow"); break; case tBlue: Odeslat(srBlue, "srBlue"); break; case tRed: Odeslat(srRed, "srRed"); break; case tGreen: Odeslat(srGreen, "srGreen"); break; case tUp: Odeslat(srUp, "srUp"); break; case tDown: Odeslat(srDown, "srDown"); break; case tLeft: Odeslat(srLeft, "srLeft"); break; case tRight: Odeslat(srRight, "srRight"); break; case tOK: Odeslat(srOK, "srOK"); break; case tPUp: Odeslat(srPUp, "srPUp"); break; case tPDown: Odeslat(srPDown, "srPDown"); break; case tPlay: Odeslat(srPlay, "srPlay"); break; case tPause: Odeslat(srPlay, "srPlay"); break; case tStop: Odeslat(srStop, "srStop"); break; case tRev: Odeslat(srRev, "srRev"); break; case tFwd: Odeslat(srFwd, "srFwd"); break; case tRec: Odeslat(srRec, "srRec"); break; case tPRECH: Odeslat(srClear, "srClear"); break; case tPowerS: Odeslat(srPower, "srPower"); break; case t1: Odeslat(sr1, "sr1"); break; case t2: Odeslat(sr2, "sr2"); break; case t3: Odeslat(sr3, "sr3"); break; case t4: Odeslat(sr4, "sr4"); break; case t5: Odeslat(sr5, "sr5"); break; case t6: Odeslat(sr6, "sr6"); break; case t7: Odeslat(sr7, "sr7"); break; case t8: Odeslat(sr8, "sr8"); break; case t9: Odeslat(sr9, "sr9"); break; case t0: Odeslat(sr0, "sr0"); break; case tSource: doSTB = 0; //Serial.println(F("Vypinam prevod do STB")); break; case tSmart: doSTB = 0; //Serial.println(F("Vypinam prevod do STB")); break; case tMenu: doSTB = 0; //Serial.println(F("Vypinam prevod do STB")); break; case tTools: doSTB = 0; //Serial.println(F("Vypinam prevod do STB")); break; case tExit: doSTB = 1; //Serial.println(F("Zapinam prevod do STB")); break; case tGuide: if (LEDstate == 0) { LEDstate = 255; } else { LEDstate = 0; } analogWrite(LEDpin, LEDstate); Serial.print(TVstate); Serial.print(F("|")); Serial.println(LEDstate); break; } irrecv.resume(); // Receive the next value } } unsigned int Odeslat(const unsigned int* Kod, char* text) { unsigned int raw[67]; for (int i = 0; i < 67; i++) { raw[i] = pgm_read_word_near(Kod + i); } if (doSTB || text[0] == 't') { delay(100); // Zpožděné odeslání irsend.sendRaw(raw, 67, 38); //Serial.print(F("Odesilam kod: ")); //Serial.println(text); irrecv.enableIRIn(); } } void serialEvent() { while (Serial.available()) { char inChar = (char)Serial.read(); //Serial.println(inChar); if (inChar == ';') { BTok = true; } else { BTin += inChar; } } }
18.5.2016 v 0:34 #6918mitch
ÚčastníkTak snad jsem na nic nezapomněl 🙂
Poprvé co jsem kreslil schéma v Eagle tak snad dobrý 🙂Attachments:
18.5.2016 v 8:05 #6920posjirka
Účastníkjá myslím , že je to dobrý nejen na poprvé 🙂 .
Pár poznámek:
– Odpor R3 si myslím, že patří až za R4 (směrem k RX_BT) – předpokládám, že to má být odporový dělič pro konverzi 5V na 3,3V
– vstup „NAPETI_Z_TV“ bych pro jistotu oddělil odporem 100R až 470R. můžeš odpálit port Arduina (D2)
– to samé přívod o IR1 (D11)
– to samé TX_BT (RX0) – vzhledem, k tomu, že odpojuješ BT modul od napájení nikdy nevíš, co se ti kde nakmitne …19.5.2016 v 1:31 #6922mitch
ÚčastníkS tím děličem si měl pravdu. Pouze chyba při kreslení. Dělal jsem to z hlavy, ale zapojené jsem to měl dobře 🙂
Pro jistotu jsem tam přidal ty odpory jak jsi zmiňoval. Vzal jsem co jsem našel v šuplíku 🙂
Výrobek je hotový a teď už ho jen zamontovat za TV a natahat finálně kabeláž 🙂Attachments:
19.5.2016 v 1:39 #6924mitch
ÚčastníkJeště obrázky. Nějak dlouho trvá než se vždy příspěvek odešle 🙂
Attachments:
-
AutorPříspěvky
- Pro reakci na toto téma se musíte přihlásit.