I obtain my code below from analysir tools, the remote is for daikin brc4c151
{5056,2144,380,1780,380,700,388,692,384,696,384,1780,376,704,384,696,384,696,380,700,380,1780,388,692,384,1776,380,1784,384,696,384,1776,380,1780,388,1772,384,1780,376,1784,384,696,380,1780,380,700,388,692,384,696,384,700,376,704,376,704,384,1776,380,1780,380,700,388,692,384,696,384,700,376,704,376,1784,384,696,380,700,380,700,380,700,388,692,384,696,384,700,380,700,376,704,384,696,384,696,380,700,380,700,380,700,388,1776,380,1780,376,1784,384,1776,380,700,380,700,388,696,380,29420,5068,2132,384,1780,384,696,384,696,380,700,380,1780,388,692,384,696,384,696,384,696,380,1784,384,696,384,1776,380,1780,388,692,384,1780,376,1784,384,1776,380,1780,388,1772,384,696,384,1780,384,696,384,696,380,700,380,700,380,700,388,692,384,1776,380,1784,384,696,384,696,380,700,384,696,380,700,388,692,384,696,384,696,380,704,376,704,384,696,384,1776,380,1780,388,692,384,696,384,1780,376,1784,384,1776,380,700,376,704,388,692,384,696,384,700,376,704,376,704,384,696,384,696,380,700,380,700,376,704,388,692,384,696,384,1780,376,704,384,696,384,696,380,700,380,700,376,704,388,696,380,696,384,700,376,704,376,704,384,696,384,696,380,700,380,700,376,704,388,692,384,696,384,700,376,704,376,1784,384,696,380,1780,380,700,388,692,384,700,380,1780,376,704,384,1776,380,700,380,1780,388,1776,380,700,376,704,376,704,384,696,384,696,380,700,380,700,388,692,388,692,384,700,380,700,376,704,388,692,384,696,384,696,380,1780,388,692,388,692,384,700,380,1780,388,1772,384,696,380,1780,388,692,388,692,384,700,380}, //OFF19
{5072,2132,384,1776,380,700,376,704,376,704,384,1776,380,700,380,700,380,700,388,696,380,1780,380,700,376,1784,384,1776,380,700,380,1784,384,1776,380,1780,388,1772,384,1776,380,700,388,1776,380,700,380,700,380,700,376,704,384,696,384,696,384,1776,380,1784,384,696,380,700,380,700,376,704,388,696,380,1776,380,704,376,704,384,696,384,696,380,700,380,700,380,700,388,692,384,696,384,696,384,696,380,704,384,696,384,696,384,1776,380,1780,388,1772,384,1780,376,704,384,696,384,696,380,29420,5072,2132,380,1780,380,700,388,692,384,696,384,1776,380,704,384,696,384,696,380,700,380,1780,376,704,384,1776,384,1780,376,704,384,1776,380,1780,376,1784,384,1780,376,1784,384,696,384,1776,380,700,376,704,388,696,380,696,384,700,380,700,376,1784,384,1776,380,700,380,700,388,692,388,692,384,700,380,700,376,704,376,704,384,696,384,696,380,704,376,1780,388,1776,380,700,380,700,376,1784,384,1776,380,1780,388,692,388,696,380,700,380,700,380,700,388,696,380,696,384,696,380,700,380,1780,388,696,380,700,380,700,380,700,376,1784,384,696,384,696,380,700,380,700,388,696,384,696,380,700,380,700,376,704,388,692,384,696,384,700,376,700,380,700,380,704,384,696,380,700,380,700,380,700,376,1784,384,1776,380,700,380,1784,384,696,380,700,380,700,376,1784,384,696,384,1776,380,704,384,1776,380,1780,376,704,388,692,384,696,384,696,384,696,380,704,376,704,384,696,384,696,380,700,380,700,376,704,388,692,384,696,384,696,380,1784,384,696,384,696,380,1780,380,700,388,692,384,1776,384,1780,384,696,384,696,380,700,380}, //ON20
{5056,2144,380,1780,380,700,388,696,380,700,380,1780,376,704,384,696,384,696,384,696,380,1780,388,696,384,1776,380,1780,388,692,384,1776,380,1780,388,1776,380,1780,376,1784,384,696,384,1776,380,700,380,704,384,696,380,700,380,700,380,700,376,1784,384,1776,380,700,380,704,384,696,384,696,380,700,380,1780,388,692,384,696,384,696,380,700,380,704,384,696,384,696,380,700,380,700,380,700,388,692,388,692,384,696,384,700,376,1784,384,1776,380,1780,376,1784,384,696,384,700,376,704,376,29424,5064,2140,384,1776,380,700,380,700,380,700,376,1784,384,696,384,696,380,704,376,704,384,1776,380,700,380,1780,388,1772,384,696,380,1784,384,1776,380,1780,376,1784,384,1776,384,700,376,1784,384,696,380,700,380,700,380,700,392,688,384,696,384,1780,376,1784,384,700,376,700,380,700,380,700,388,692,384,696,384,700,380,700,376,704,384,696,384,696,384,1776,380,1780,388,692,384,696,384,1784,384,1772,384,1776,380,700,388,692,388,696,380,700,380,700,376,704,388,692,384,696,384,696,384,1776,380,704,384,696,384,696,380,700,380,1780,388,692,384,696,384,696,380,700,380,704,384,696,384,696,380,700,380,700,380,700,388,692,384,696,384,696,384,696,380,704,384,696,384,696,384,696,380,700,380,700,376,704,388,1772,384,1780,376,704,384,696,384,696,384,1776,380,700,388,1772,384,696,384,1780,384,1776,384,696,380,700,380,700,388,692,388,692,384,696,384,700,376,704,376,704,384,696,384,696,380,700,380,700,380,700,388,692,384,1780,380,700,376,704,384,1776,384,1776,380,700,388,1776,380,1780,376,704,388,692,384,696,384}, //ON21
{5056,2144,384,1776,380,700,380,700,388,696,384,1776,380,728,348,732,360,720,356,696,384,1776,380,700,380,1784,380,1780,380,700,376,1784,384,1776,380,1780,388,1776,380,1780,376,704,384,1776,384,696,380,732,348,732,356,696,384,724,352,728,352,1780,388,1772,384,696,380,704,376,732,356,724,356,696,380,1780,380,728,348,704,384,696,384,696,412,700,380,672,404,676,404,676,412,668,412,696,380,672,408,676,404,672,416,664,416,1744,380,1784,384,1776,380,1780,388,692,416,664,416,696,380,29392,5084,2148,380,1748,388,696,412,668,412,668,408,1752,384,696,416,664,412,700,380,668,412,1752,412,668,412,1748,408,1752,416,664,416,1748,408,1752,404,1756,412,1748,408,1752,416,664,412,1752,408,672,404,676,412,668,412,668,412,668,408,672,408,1752,416,1748,408,672,404,676,412,668,412,668,412,668,408,672,408,672,408,672,416,668,408,672,408,672,408,1752,412,1748,412,668,408,672,408,1752,416,1748,408,1752,416,664,412,668,412,668,412,668,408,672,408,672,416,668,412,668,408,672,408,1752,412,668,412,668,412,668,408,672,408,1756,412,668,440,640,440,640,436,644,404,676,412,668,412,668,408,672,408,672,408,676,412,668,408,672,408,672,408,672,404,676,412,668,412,668,412,668,408,704,376,1752,416,668,408,1752,408,1752,412,668,412,668,412,704,372,1752,416,668,412,1744,412,672,404,1756,412,1748,408,700,380,704,376,704,372,708,384,696,380,700,380,700,376,704,376,708,380,696,384,700,376,704,376,704,372,708,372,708,380,1752,376,732,376,704,376,1756,380,732,344,1784,384,1780,376,1784,376,736,372,704,372,712,380}, //ON22
{5060,2172,352,1776,384,700,376,704,376,732,356,1776,380,700,380,732,344,704,388,724,352,1776,384,700,376,1784,384,1776,380,700,380,1780,388,1776,380,1780,376,1784,384,1776,380,700,380,1784,380,700,380,700,376,704,376,704,384,696,384,696,384,1776,380,1780,384,728,352,700,380,700,376,732,360,692,384,1776,380,700,380,732,348,700,408,676,412,696,384,696,384,668,408,700,380,672,416,696,384,664,412,700,380,672,404,676,412,1748,412,1748,408,1752,412,1752,408,668,408,676,404,704,384,29388,5088,2144,384,1748,408,672,408,676,400,676,416,1744,412,668,412,700,376,676,412,696,384,1748,408,672,408,1752,412,1752,408,672,404,1756,412,1748,408,1752,408,1752,412,1748,412,672,404,1756,412,668,412,668,408,672,408,672,416,664,412,668,412,1752,404,1756,412,668,412,668,408,672,408,672,404,676,416,664,412,700,380,672,404,676,404,676,412,668,412,1748,408,1752,416,664,416,668,408,1752,404,1756,412,1748,408,672,408,672,416,664,416,664,412,672,408,672,408,672,404,676,412,668,412,1748,408,672,408,672,416,664,412,672,408,1752,404,676,416,664,412,668,412,668,408,672,408,672,408,676,412,668,408,700,380,700,380,672,436,644,436,644,432,648,440,640,440,640,408,676,412,668,412,696,380,672,408,1752,416,1744,412,1748,408,672,408,676,412,668,412,1752,404,672,404,1756,412,668,412,1748,408,1756,412,668,408,672,408,672,404,704,376,704,376,704,384,700,380,700,376,704,376,704,372,708,372,708,380,700,380,700,376,704,376,1756,412,696,380,704,376,1752,416,1748,408,1752,404,1756,412,1748,408,704,376,704,372,708,372}, //ON23
{5060,2168,356,1776,384,696,380,732,348,700,388,1776,380,700,380,700,376,704,388,720,356,1776,380,700,380,1780,388,1776,380,700,380,1780,384,1776,384,1776,380,1784,380,1780,380,700,376,1784,384,696,384,696,380,732,348,732,356,696,384,696,380,1780,376,1784,384,696,384,696,380,700,380,700,380,704,384,1776,380,700,380,728,348,704,408,672,416,664,412,668,412,700,380,672,404,704,384,668,412,668,408,700,380,672,408,704,384,1744,412,1752,404,1756,412,1748,408,672,408,704,376,672,416,29388,5088,2144,380,1748,408,676,404,708,380,696,384,1748,408,672,408,672,416,664,412,668,412,1748,408,676,412,1748,412,1748,408,672,416,1744,412,1748,408,1756,412,1748,408,1752,416,664,416,1744,412,668,408,676,404,676,412,668,412,696,380,700,380,1752,416,1744,412,668,408,676,404,676,412,668,412,696,380,672,408,672,408,672,416,664,412,668,412,672,408,1752,412,1748,412,668,408,676,404,1752,416,1744,412,1752,412,668,412,668,412,668,408,672,408,672,404,676,416,664,412,668,412,672,404,1756,412,668,412,668,408,672,408,672,408,1752,412,668,412,672,404,676,404,676,412,668,412,668,412,668,408,672,408,672,416,668,408,672,408,672,436,644,436,644,436,644,432,648,440,640,408,704,376,672,408,1756,408,1752,404,1756,412,1748,408,672,408,672,408,672,416,1748,408,672,408,1752,412,668,412,1748,408,1752,416,664,412,672,408,672,408,700,376,704,376,704,384,696,384,696,380,700,380,704,372,708,372,708,380,700,380,700,376,704,376,1756,412,696,380,704,376,1752,404,708,380,700,380,700,380,700,376,1752,416,696,384,696,380}, //ON24
{5060,2140,388,1776,380,696,380,700,380,700,380,1784,380,700,380,700,380,700,376,704,384,1776,384,696,380,1780,388,1776,380,728,352,1780,384,1776,384,1776,380,1784,384,1776,380,728,348,1784,384,728,352,728,348,732,348,732,348,732,356,724,352,1780,380,1780,384,728,352,728,352,728,348,732,348,732,356,1776,380,728,352,728,348,704,388,724,352,696,384,728,348,700,380,732,356,696,384,696,380,700,380,700,376,704,388,692,384,1776,380,1784,376,1784,380,1780,380,732,344,704,384,696,416,29388,5088,2112,412,1748,412,700,376,676,412,668,412,1748,408,700,380,672,404,676,416,664,412,1748,408,704,376,1756,412,1748,408,704,376,1752,412,1752,404,1756,412,1748,408,1752,408,704,384,1744,412,700,380,672,404,676,412,696,384,668,412,668,408,1752,416,1744,412,700,380,672,408,672,404,676,412,668,412,668,408,672,408,672,408,672,416,664,412,668,412,1752,404,1756,412,696,384,668,408,1752,416,1748,408,1752,404,704,384,668,412,668,412,668,408,672,408,672,416,664,416,664,412,672,408,1752,416,664,412,668,412,668,408,672,408,1752,416,664,412,672,408,672,404,676,404,676,412,668,412,672,404,672,408,672,404,676,416,664,412,672,408,672,404,676,404,676,412,668,412,668,408,672,408,672,408,672,416,664,412,672,408,672,408,1752,412,668,412,668,412,1748,408,672,416,1748,408,672,408,1752,404,1756,412,668,408,672,408,672,408,672,416,668,408,672,408,672,408,672,404,676,412,668,412,668,412,668,408,672,408,672,416,668,412,1748,408,672,404,676,404,1756,412,1748,408,672,408,676,432,648,440,1720,436,644,436,644,432}, //ON25
{5068,2136,380,1780,376,704,388,692,384,696,384,1776,380,704,384,696,384,696,380,700,380,1780,388,692,384,1776,380,1784,384,696,384,1776,380,1780,388,1772,384,1776,380,1784,384,696,380,1780,376,704,388,692,384,696,384,696,380,700,380,704,384,1776,380,1780,376,704,388,696,380,696,384,696,380,700,380,1784,384,696,380,700,380,700,376,704,388,692,384,696,384,696,380,704,376,704,384,696,384,696,380,700,380,704,376,700,388,1772,384,1776,380,1784,384,1776,380,700,380,700,388,692,384,29420,5056,2144,384,1776,380,700,388,692,388,692,384,1776,380,704,376,704,384,696,384,696,380,1780,380,700,388,1772,384,1780,376,704,384,1776,380,1780,380,1780,384,1776,384,1780,384,696,384,1776,380,700,380,700,388,692,384,696,384,696,384,700,376,1788,380,1776,380,700,380,700,376,704,384,696,384,696,384,700,376,704,376,704,384,696,384,696,380,700,380,1780,388,1776,380,700,376,704,376,1784,384,1776,380,1780,388,692,384,696,384,700,376,704,376,704,384,696,384,696,380,700,380,700,376,1784,384,696,384,700,376,704,376,704,384,1776,380,700,380,700,380,700,388,692,384,696,384,700,376,704,376,704,384,696,384,696,380,700,380,700,380,700,388,692,384,696,384,700,376,704,376,704,384,696,384,1776,380,700,380,700,388,692,384,1780,380,700,376,704,384,1776,380,700,380,1780,388,692,384,1776,384,1780,384,696,384,696,384,696,380,700,380,700,376,704,388,696,380,696,384,700,376,704,376,704,384,696,384,696,380,700,380,700,380,1780,384,696,384,700,376,1784,384,696,384,1776,380,700,380,700,388,1772,384,704,376,700,376}, //ON26
then I use this code to send the raw code with progmem but isn't working, can anyone tell me the problem
Thank you
Code: Select all
IRsend irsend;
void setup() {
Serial.begin(9600);
}
String inData;
const unsigned int irTable[8][359] PROGMEM = {
{5056,2144,380,1780,380,700,388,692,384,696,384,1780,376,704,384,696,384,696,380,700,380,1780,388,692,384,1776,380,1784,384,696,384,1776,380,1780,388,1772,384,1780,376,1784,384,696,380,1780,380,700,388,692,384,696,384,700,376,704,376,704,384,1776,380,1780,380,700,388,692,384,696,384,700,376,704,376,1784,384,696,380,700,380,700,380,700,388,692,384,696,384,700,380,700,376,704,384,696,384,696,380,700,380,700,380,700,388,1776,380,1780,376,1784,384,1776,380,700,380,700,388,696,380,29420,5068,2132,384,1780,384,696,384,696,380,700,380,1780,388,692,384,696,384,696,384,696,380,1784,384,696,384,1776,380,1780,388,692,384,1780,376,1784,384,1776,380,1780,388,1772,384,696,384,1780,384,696,384,696,380,700,380,700,380,700,388,692,384,1776,380,1784,384,696,384,696,380,700,384,696,380,700,388,692,384,696,384,696,380,704,376,704,384,696,384,1776,380,1780,388,692,384,696,384,1780,376,1784,384,1776,380,700,376,704,388,692,384,696,384,700,376,704,376,704,384,696,384,696,380,700,380,700,376,704,388,692,384,696,384,1780,376,704,384,696,384,696,380,700,380,700,376,704,388,696,380,696,384,700,376,704,376,704,384,696,384,696,380,700,380,700,376,704,388,692,384,696,384,700,376,704,376,1784,384,696,380,1780,380,700,388,692,384,700,380,1780,376,704,384,1776,380,700,380,1780,388,1776,380,700,376,704,376,704,384,696,384,696,380,700,380,700,388,692,388,692,384,700,380,700,376,704,388,692,384,696,384,696,380,1780,388,692,388,692,384,700,380,1780,388,1772,384,696,380,1780,388,692,388,692,384,700,380}, //OFF19
{5072,2132,384,1776,380,700,376,704,376,704,384,1776,380,700,380,700,380,700,388,696,380,1780,380,700,376,1784,384,1776,380,700,380,1784,384,1776,380,1780,388,1772,384,1776,380,700,388,1776,380,700,380,700,380,700,376,704,384,696,384,696,384,1776,380,1784,384,696,380,700,380,700,376,704,388,696,380,1776,380,704,376,704,384,696,384,696,380,700,380,700,380,700,388,692,384,696,384,696,384,696,380,704,384,696,384,696,384,1776,380,1780,388,1772,384,1780,376,704,384,696,384,696,380,29420,5072,2132,380,1780,380,700,388,692,384,696,384,1776,380,704,384,696,384,696,380,700,380,1780,376,704,384,1776,384,1780,376,704,384,1776,380,1780,376,1784,384,1780,376,1784,384,696,384,1776,380,700,376,704,388,696,380,696,384,700,380,700,376,1784,384,1776,380,700,380,700,388,692,388,692,384,700,380,700,376,704,376,704,384,696,384,696,380,704,376,1780,388,1776,380,700,380,700,376,1784,384,1776,380,1780,388,692,388,696,380,700,380,700,380,700,388,696,380,696,384,696,380,700,380,1780,388,696,380,700,380,700,380,700,376,1784,384,696,384,696,380,700,380,700,388,696,384,696,380,700,380,700,376,704,388,692,384,696,384,700,376,700,380,700,380,704,384,696,380,700,380,700,380,700,376,1784,384,1776,380,700,380,1784,384,696,380,700,380,700,376,1784,384,696,384,1776,380,704,384,1776,380,1780,376,704,388,692,384,696,384,696,384,696,380,704,376,704,384,696,384,696,380,700,380,700,376,704,388,692,384,696,384,696,380,1784,384,696,384,696,380,1780,380,700,388,692,384,1776,384,1780,384,696,384,696,380,700,380}, //ON20
{5056,2144,380,1780,380,700,388,696,380,700,380,1780,376,704,384,696,384,696,384,696,380,1780,388,696,384,1776,380,1780,388,692,384,1776,380,1780,388,1776,380,1780,376,1784,384,696,384,1776,380,700,380,704,384,696,380,700,380,700,380,700,376,1784,384,1776,380,700,380,704,384,696,384,696,380,700,380,1780,388,692,384,696,384,696,380,700,380,704,384,696,384,696,380,700,380,700,380,700,388,692,388,692,384,696,384,700,376,1784,384,1776,380,1780,376,1784,384,696,384,700,376,704,376,29424,5064,2140,384,1776,380,700,380,700,380,700,376,1784,384,696,384,696,380,704,376,704,384,1776,380,700,380,1780,388,1772,384,696,380,1784,384,1776,380,1780,376,1784,384,1776,384,700,376,1784,384,696,380,700,380,700,380,700,392,688,384,696,384,1780,376,1784,384,700,376,700,380,700,380,700,388,692,384,696,384,700,380,700,376,704,384,696,384,696,384,1776,380,1780,388,692,384,696,384,1784,384,1772,384,1776,380,700,388,692,388,696,380,700,380,700,376,704,388,692,384,696,384,696,384,1776,380,704,384,696,384,696,380,700,380,1780,388,692,384,696,384,696,380,700,380,704,384,696,384,696,380,700,380,700,380,700,388,692,384,696,384,696,384,696,380,704,384,696,384,696,384,696,380,700,380,700,376,704,388,1772,384,1780,376,704,384,696,384,696,384,1776,380,700,388,1772,384,696,384,1780,384,1776,384,696,380,700,380,700,388,692,388,692,384,696,384,700,376,704,376,704,384,696,384,696,380,700,380,700,380,700,388,692,384,1780,380,700,376,704,384,1776,384,1776,380,700,388,1776,380,1780,376,704,388,692,384,696,384}, //ON21
{5056,2144,384,1776,380,700,380,700,388,696,384,1776,380,728,348,732,360,720,356,696,384,1776,380,700,380,1784,380,1780,380,700,376,1784,384,1776,380,1780,388,1776,380,1780,376,704,384,1776,384,696,380,732,348,732,356,696,384,724,352,728,352,1780,388,1772,384,696,380,704,376,732,356,724,356,696,380,1780,380,728,348,704,384,696,384,696,412,700,380,672,404,676,404,676,412,668,412,696,380,672,408,676,404,672,416,664,416,1744,380,1784,384,1776,380,1780,388,692,416,664,416,696,380,29392,5084,2148,380,1748,388,696,412,668,412,668,408,1752,384,696,416,664,412,700,380,668,412,1752,412,668,412,1748,408,1752,416,664,416,1748,408,1752,404,1756,412,1748,408,1752,416,664,412,1752,408,672,404,676,412,668,412,668,412,668,408,672,408,1752,416,1748,408,672,404,676,412,668,412,668,412,668,408,672,408,672,408,672,416,668,408,672,408,672,408,1752,412,1748,412,668,408,672,408,1752,416,1748,408,1752,416,664,412,668,412,668,412,668,408,672,408,672,416,668,412,668,408,672,408,1752,412,668,412,668,412,668,408,672,408,1756,412,668,440,640,440,640,436,644,404,676,412,668,412,668,408,672,408,672,408,676,412,668,408,672,408,672,408,672,404,676,412,668,412,668,412,668,408,704,376,1752,416,668,408,1752,408,1752,412,668,412,668,412,704,372,1752,416,668,412,1744,412,672,404,1756,412,1748,408,700,380,704,376,704,372,708,384,696,380,700,380,700,376,704,376,708,380,696,384,700,376,704,376,704,372,708,372,708,380,1752,376,732,376,704,376,1756,380,732,344,1784,384,1780,376,1784,376,736,372,704,372,712,380}, //ON22
{5060,2172,352,1776,384,700,376,704,376,732,356,1776,380,700,380,732,344,704,388,724,352,1776,384,700,376,1784,384,1776,380,700,380,1780,388,1776,380,1780,376,1784,384,1776,380,700,380,1784,380,700,380,700,376,704,376,704,384,696,384,696,384,1776,380,1780,384,728,352,700,380,700,376,732,360,692,384,1776,380,700,380,732,348,700,408,676,412,696,384,696,384,668,408,700,380,672,416,696,384,664,412,700,380,672,404,676,412,1748,412,1748,408,1752,412,1752,408,668,408,676,404,704,384,29388,5088,2144,384,1748,408,672,408,676,400,676,416,1744,412,668,412,700,376,676,412,696,384,1748,408,672,408,1752,412,1752,408,672,404,1756,412,1748,408,1752,408,1752,412,1748,412,672,404,1756,412,668,412,668,408,672,408,672,416,664,412,668,412,1752,404,1756,412,668,412,668,408,672,408,672,404,676,416,664,412,700,380,672,404,676,404,676,412,668,412,1748,408,1752,416,664,416,668,408,1752,404,1756,412,1748,408,672,408,672,416,664,416,664,412,672,408,672,408,672,404,676,412,668,412,1748,408,672,408,672,416,664,412,672,408,1752,404,676,416,664,412,668,412,668,408,672,408,672,408,676,412,668,408,700,380,700,380,672,436,644,436,644,432,648,440,640,440,640,408,676,412,668,412,696,380,672,408,1752,416,1744,412,1748,408,672,408,676,412,668,412,1752,404,672,404,1756,412,668,412,1748,408,1756,412,668,408,672,408,672,404,704,376,704,376,704,384,700,380,700,376,704,376,704,372,708,372,708,380,700,380,700,376,704,376,1756,412,696,380,704,376,1752,416,1748,408,1752,404,1756,412,1748,408,704,376,704,372,708,372}, //ON23
{5060,2168,356,1776,384,696,380,732,348,700,388,1776,380,700,380,700,376,704,388,720,356,1776,380,700,380,1780,388,1776,380,700,380,1780,384,1776,384,1776,380,1784,380,1780,380,700,376,1784,384,696,384,696,380,732,348,732,356,696,384,696,380,1780,376,1784,384,696,384,696,380,700,380,700,380,704,384,1776,380,700,380,728,348,704,408,672,416,664,412,668,412,700,380,672,404,704,384,668,412,668,408,700,380,672,408,704,384,1744,412,1752,404,1756,412,1748,408,672,408,704,376,672,416,29388,5088,2144,380,1748,408,676,404,708,380,696,384,1748,408,672,408,672,416,664,412,668,412,1748,408,676,412,1748,412,1748,408,672,416,1744,412,1748,408,1756,412,1748,408,1752,416,664,416,1744,412,668,408,676,404,676,412,668,412,696,380,700,380,1752,416,1744,412,668,408,676,404,676,412,668,412,696,380,672,408,672,408,672,416,664,412,668,412,672,408,1752,412,1748,412,668,408,676,404,1752,416,1744,412,1752,412,668,412,668,412,668,408,672,408,672,404,676,416,664,412,668,412,672,404,1756,412,668,412,668,408,672,408,672,408,1752,412,668,412,672,404,676,404,676,412,668,412,668,412,668,408,672,408,672,416,668,408,672,408,672,436,644,436,644,436,644,432,648,440,640,408,704,376,672,408,1756,408,1752,404,1756,412,1748,408,672,408,672,408,672,416,1748,408,672,408,1752,412,668,412,1748,408,1752,416,664,412,672,408,672,408,700,376,704,376,704,384,696,384,696,380,700,380,704,372,708,372,708,380,700,380,700,376,704,376,1756,412,696,380,704,376,1752,404,708,380,700,380,700,380,700,376,1752,416,696,384,696,380}, //ON24
{5060,2140,388,1776,380,696,380,700,380,700,380,1784,380,700,380,700,380,700,376,704,384,1776,384,696,380,1780,388,1776,380,728,352,1780,384,1776,384,1776,380,1784,384,1776,380,728,348,1784,384,728,352,728,348,732,348,732,348,732,356,724,352,1780,380,1780,384,728,352,728,352,728,348,732,348,732,356,1776,380,728,352,728,348,704,388,724,352,696,384,728,348,700,380,732,356,696,384,696,380,700,380,700,376,704,388,692,384,1776,380,1784,376,1784,380,1780,380,732,344,704,384,696,416,29388,5088,2112,412,1748,412,700,376,676,412,668,412,1748,408,700,380,672,404,676,416,664,412,1748,408,704,376,1756,412,1748,408,704,376,1752,412,1752,404,1756,412,1748,408,1752,408,704,384,1744,412,700,380,672,404,676,412,696,384,668,412,668,408,1752,416,1744,412,700,380,672,408,672,404,676,412,668,412,668,408,672,408,672,408,672,416,664,412,668,412,1752,404,1756,412,696,384,668,408,1752,416,1748,408,1752,404,704,384,668,412,668,412,668,408,672,408,672,416,664,416,664,412,672,408,1752,416,664,412,668,412,668,408,672,408,1752,416,664,412,672,408,672,404,676,404,676,412,668,412,672,404,672,408,672,404,676,416,664,412,672,408,672,404,676,404,676,412,668,412,668,408,672,408,672,408,672,416,664,412,672,408,672,408,1752,412,668,412,668,412,1748,408,672,416,1748,408,672,408,1752,404,1756,412,668,408,672,408,672,408,672,416,668,408,672,408,672,408,672,404,676,412,668,412,668,412,668,408,672,408,672,416,668,412,1748,408,672,404,676,404,1756,412,1748,408,672,408,676,432,648,440,1720,436,644,436,644,432}, //ON25
{5068,2136,380,1780,376,704,388,692,384,696,384,1776,380,704,384,696,384,696,380,700,380,1780,388,692,384,1776,380,1784,384,696,384,1776,380,1780,388,1772,384,1776,380,1784,384,696,380,1780,376,704,388,692,384,696,384,696,380,700,380,704,384,1776,380,1780,376,704,388,696,380,696,384,696,380,700,380,1784,384,696,380,700,380,700,376,704,388,692,384,696,384,696,380,704,376,704,384,696,384,696,380,700,380,704,376,700,388,1772,384,1776,380,1784,384,1776,380,700,380,700,388,692,384,29420,5056,2144,384,1776,380,700,388,692,388,692,384,1776,380,704,376,704,384,696,384,696,380,1780,380,700,388,1772,384,1780,376,704,384,1776,380,1780,380,1780,384,1776,384,1780,384,696,384,1776,380,700,380,700,388,692,384,696,384,696,384,700,376,1788,380,1776,380,700,380,700,376,704,384,696,384,696,384,700,376,704,376,704,384,696,384,696,380,700,380,1780,388,1776,380,700,376,704,376,1784,384,1776,380,1780,388,692,384,696,384,700,376,704,376,704,384,696,384,696,380,700,380,700,376,1784,384,696,384,700,376,704,376,704,384,1776,380,700,380,700,380,700,388,692,384,696,384,700,376,704,376,704,384,696,384,696,380,700,380,700,380,700,388,692,384,696,384,700,376,704,376,704,384,696,384,1776,380,700,380,700,388,692,384,1780,380,700,376,704,384,1776,380,700,380,1780,388,692,384,1776,384,1780,384,696,384,696,384,696,380,700,380,700,376,704,388,696,380,696,384,700,376,704,376,704,384,696,384,696,380,700,380,700,380,1780,384,696,384,700,376,1784,384,696,384,1776,380,700,380,700,388,1772,384,704,376,700,376}, //ON26
};
unsigned int irBuf[200];
void sendir(int i) {
memcpy_P ( irBuf, &irTable[i][0], 359 * 2);
irsend.sendRaw (irBuf, 67, 38);
}
void loop()
{
while (Serial.available() > 0)
{
char recieved = Serial.read();
inData += recieved;
// Process message when new line character is recieved
if (recieved == '\n')
{
if (inData == "OFF") {
sendir(0);
}
if (inData == "ON pada 20") {
sendir(1);
}
if (inData == "ON pada 21") {
sendir(2);
}
if (inData == "ON pada 22") {
sendir(3);
}
if (inData == "ON pada 23") {
sendir(4);
}
if (inData == "ON pada 24") {
sendir(5);
}
if (inData == "ON pada 25") {
sendir(6);
}
if (inData == "ON pada 26") {
sendir(7);
}
Serial.print(inData);
inData = ""; // Clear recieved buffer
}
}
}