Send some IR raw

Topics not directly related to AnalysIR or IR
Post Reply
M Beni Harja
Posts: 3
Joined: Tue Mar 12, 2019 2:58 am

Send some IR raw

Post by M Beni Harja » Mon Jun 17, 2019 9:12 am

Hi

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
        }
    }

}

User avatar
AnalysIR
Site Admin
Posts: 524
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: Send some IR raw

Post by AnalysIR » Mon Jun 17, 2019 9:41 am

Check out our blog post on sending IR signals from flash(progmem)

https://www.analysir.com/blog/2016/04/1 ... -irremote/

M Beni Harja
Posts: 3
Joined: Tue Mar 12, 2019 2:58 am

Re: Send some IR raw

Post by M Beni Harja » Mon Jul 01, 2019 6:19 pm

But I used esp8266, i have tried and its hard to find same code for esp8266
Help me :((

User avatar
AnalysIR
Site Admin
Posts: 524
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: Send some IR raw

Post by AnalysIR » Tue Jul 02, 2019 12:15 pm

It may have been more helpful, if you had mentioned ESP8266 in your first post !

From Our blog:https://www.analysir.com/blog/2017/01/2 ... r-signals/ shows how to send signals on ESP8266.

Alternatively, you could also try the ESP8266 fork of IRremote: https://github.com/markszabo/IRremoteESP8266

We also offer an A.IR Shield on our web-shop, using ESP8266 or ESP32: https://www.analysir.com/blog/product/a ... ed-module/

M Beni Harja
Posts: 3
Joined: Tue Mar 12, 2019 2:58 am

Re: Send some IR raw

Post by M Beni Harja » Thu Jul 04, 2019 1:29 pm

Hi i try to modified the sketch myself, no error notifications comes up in compiling. But when i connect the ir LED to pin D2 of esp8266, there is no signal transmitted from the ir LED

Code: Select all

#include <Arduino.h>
#include <IRremoteESP8266.h>
#include <IRsend.h>

const uint16_t kIrLed = 4;  // ESP8266 GPIO pin to use. Recommended: 4 (D2).

IRsend irsend(kIrLed);  // Set the GPIO to be used to sending the message.

//Example signals from various units (very long signals)
const unsigned int AC_irSignal1[] PROGMEM = {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
const unsigned int AC_irSignal2[] PROGMEM = {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
const unsigned int AC_irSignal3[] PROGMEM = {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
const unsigned int AC_irSignal4[] PROGMEM = {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
const unsigned int AC_irSignal5[] PROGMEM = {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
const unsigned int AC_irSignal6[] PROGMEM = {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
const unsigned int AC_irSignal7[] PROGMEM = {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
const unsigned int AC_irSignal8[] 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


void setup() {
  //insert your own setup code here
  irsend.begin();
#if ESP8266
  Serial.begin(115200, SERIAL_8N1, SERIAL_TX_ONLY);
#else  // ESP8266
  Serial.begin(115200, SERIAL_8N1);
#endif  // ESP8266
}

void loop() {
  //replace this with your own code.
  while (true){ //loop forever sending the test signals, with 5 second gaps 
  sendRAW_Flash(AC_irSignal1, sizeof(AC_irSignal1)/sizeof(int),38); //send AC signal #1 @ 38kHz
  delay(5000); //a good idea to have gaps between signals

  sendRAW_Flash(AC_irSignal2, sizeof(AC_irSignal2)/sizeof(int),38); //send AC signal #2 @ 38kHz
  delay(5000); //a good idea to have gaps between signals

  sendRAW_Flash(AC_irSignal3, sizeof(AC_irSignal3)/sizeof(int),38); //send AC signal #3 @ 38kHz
  delay(5000); //a good idea to have gaps between signals

  sendRAW_Flash(AC_irSignal4, sizeof(AC_irSignal4)/sizeof(int),38); //send AC signal #4 @ 38kHz
  delay(5000); //a good idea to have gaps between signals

  sendRAW_Flash(AC_irSignal5, sizeof(AC_irSignal5)/sizeof(int),38); //send AC signal #5 @ 38kHz
  delay(5000); //a good idea to have gaps between signals

   sendRAW_Flash(AC_irSignal6, sizeof(AC_irSignal6)/sizeof(int),38); //send AC signal #6 @ 38kHz
  delay(5000); //a good idea to have gaps between signals

   sendRAW_Flash(AC_irSignal7, sizeof(AC_irSignal7)/sizeof(int),38); //send AC signal #7 @ 38kHz
  delay(5000); //a good idea to have gaps between signals

   sendRAW_Flash(AC_irSignal8, sizeof(AC_irSignal8)/sizeof(int),38); //send AC signal #8 @ 38kHz
  delay(5000); //a good idea to have gaps between signals
  }
}

void sendRAW_Flash(const unsigned int * signalArray, unsigned int signalLength, unsigned char carrierFreq) {

  irsend.enableIROut(carrierFreq); //initialise the carrier frequency for each signal to be sent
  
  for (unsigned int i=0;i<signalLength;i++){
    //tmp=pgm_read_word_near(&signalArray[i]);
   // tmp=cleanPanasonic(tmp); //not needed
    if (i & 1) irsend.space(pgm_read_word_near(&signalArray[i]));
    else irsend.mark(pgm_read_word_near(&signalArray[i]));
  }
  irsend.space(1);//make sure IR is turned off at end of signal

}
Help me to repair my sketch :(((
Thank you everyone.

User avatar
AnalysIR
Site Admin
Posts: 524
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: Send some IR raw

Post by AnalysIR » Thu Jul 04, 2019 1:58 pm

Now that you are using IRremoteESP8266, just use the sendraw example from this library.

The code from our blog, is different. Ignore that code as well & start from the beginning with the library example
(The PROGMEM & sendRawFlash were for AVRs not ESP)

Start with the code provided in the library example.

Only when you get that working, proceed to using your own signals.

Post Reply