Page 2 of 2

Re: Wiring ESP8266 to un arduino UNO

Posted: Thu Sep 07, 2017 6:06 pm
by AnalysIR
Sorry cannot tell.

Maybe posta link or photo of the module.

Re: Wiring ESP8266 to un arduino UNO

Posted: Fri Sep 08, 2017 1:54 pm
by ffoo31
Hello
sorry, I could not post the picture.
it joins the link of a module identical to mine

http://www.aliexpress.com/store/product ... 39199.html


cordially

Re: Wiring ESP8266 to un arduino UNO

Posted: Fri Sep 08, 2017 2:38 pm
by AnalysIR
Yes
that is the one we used in the following blog post.

https://www.analysir.com/blog/2017/01/2 ... r-signals/

You will need to make some minor modifications as explained in the blog post.

Alternatively, you can use the version of IRremote for ESP8266, without any modifications.
https://github.com/markszabo/IRremoteESP8266

Re: Wiring ESP8266 to un arduino UNO

Posted: Tue Sep 12, 2017 9:58 pm
by ffoo31
Good evening
I want to upload this code on ESP8266 but I have an error


error
-----------------
C:\Users\HPF5DF~1\AppData\Local\Temp\arduino_modified_sketch_740424\IRGCSendDemo.ino: In function 'void loop()':

IRGCSendDemo:84: error: no match for call to '(IRsend) (int)'

irsend(4).sendRaw(rawData,195,38);

^

exit status 1
no match for call to '(IRsend) (int)'

Bibliothèque non valide trouvée dans C:\Users\HPµ\Documents\Arduino\libraries\Arduino-master : C:\Users\HPµ\Documents\Arduino\libraries\Arduino-master
Bibliothèque non valide trouvée dans C:\Users\HPµ\Documents\Arduino\libraries\Arduino-master : C:\Users\HPµ\Documents\Arduino\libraries\Arduino-master

-------------------------------
code:

-------------------------

Code: Select all

#ifndef UNIT_TEST
#include <Arduino.h>
#endif
#include <IRremoteESP8266.h>
#include <IRsend.h>



IRsend irsend(4);  // An IR LED is controlled by GPIO pin 4 (D2)



// Example of data captured by IRrecvDumpV2.ino
//IRsend irsend;


unsigned int  rawData[195] = { 3148, 4428, 724, 464, 696, 1524, 672, 516, 672, 1528, 676, 516, 692, 1500, 676, 492, 716, 1508, 676, 516,
692, 496, 672, 516, 668, 528, 672, 516, 672, 520,
672, 496, 688, 524, 676, 516, 672, 516, 672, 516,
672, 524, 672, 516, 672, 1524, 672, 1524, 672, 500,
696, 516, 672, 496, 692, 516, 672, 524, 672, 520,
672, 516, 672, 516, 672, 520, 676, 1520, 676, 516,
668, 520, 672, 524, 672, 516, 672, 1524, 672, 516,
672, 520, 676, 1500, 696, 516, 672,  516, 672,  504,
692, 516, 672,  516, 676,  512, 676,  1528, 672,  520,
668, 520, 672,  496, 692,  520, 676,  1524, 672,  512,
672, 1524, 672,  524, 668,  520, 676,  516, 672,  516,
672,  504, 692,  516, 672,  516, 676,  492, 696,  524,
676,  512, 676,  516, 672,  496, 692,  504, 692,  516,
672,  516, 676,  516, 672,  520, 676,  516, 672,  516,
672,  520, 668,  524, 672,  516, 676,  516, 672,  496,
692,  524, 672,  516, 672,  516, 676,  512, 676,  520,
672,  520, 672,  516, 672,  516, 672,  524, 672,  516,
672,  516, 672,  1524, 672,  1528, 672,  1524, 672,  1504,
692,  1500, 696,  1520, 672,   };  


void setup()
{
 Serial.begin(115200);
}

void loop() {

 
     irsend(4).sendRaw(rawData,195,38);
    
     delay(3000);
    
}
-------------------------------------------------------------------


??? thanks

Re: Wiring ESP8266 to un arduino UNO

Posted: Wed Sep 13, 2017 12:18 pm
by AnalysIR
try this...changes were....
  • type definition for rawData
  • changed sendRaw statement to allow automatic size calculation, by compiler.
  • removed trailing comma in rawData array....this would have introduced an error as well
  • The IRsend irsend(4); declaration refers to setting of pin number only. The (4) shouldnt be used later for actial send statements
Please make sure to follow the examples as closely as possible.

Code: Select all

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



IRsend irsend(4); // An IR LED is controlled by GPIO pin 4 (D2)



// Example of data captured by IRrecvDumpV2.ino
//IRsend irsend;


uint16_t rawData[] = { 3148, 4428, 724, 464, 696, 1524, 672, 516, 672, 1528, 676, 516, 692, 1500, 676, 492, 716, 1508, 676, 516,
692, 496, 672, 516, 668, 528, 672, 516, 672, 520,
672, 496, 688, 524, 676, 516, 672, 516, 672, 516,
672, 524, 672, 516, 672, 1524, 672, 1524, 672, 500,
696, 516, 672, 496, 692, 516, 672, 524, 672, 520,
672, 516, 672, 516, 672, 520, 676, 1520, 676, 516,
668, 520, 672, 524, 672, 516, 672, 1524, 672, 516,
672, 520, 676, 1500, 696, 516, 672, 516, 672, 504,
692, 516, 672, 516, 676, 512, 676, 1528, 672, 520,
668, 520, 672, 496, 692, 520, 676, 1524, 672, 512,
672, 1524, 672, 524, 668, 520, 676, 516, 672, 516,
672, 504, 692, 516, 672, 516, 676, 492, 696, 524,
676, 512, 676, 516, 672, 496, 692, 504, 692, 516,
672, 516, 676, 516, 672, 520, 676, 516, 672, 516,
672, 520, 668, 524, 672, 516, 676, 516, 672, 496,
692, 524, 672, 516, 672, 516, 676, 512, 676, 520,
672, 520, 672, 516, 672, 516, 672, 524, 672, 516,
672, 516, 672, 1524, 672, 1528, 672, 1524, 672, 1504,
692, 1500, 696, 1520, 672 };


void setup()
{
Serial.begin(115200);
}

void loop() {


irsend.sendRaw(rawData,sizeof(rawData)/sizeof(rawData[0]),38);

delay(3000);

}

Re: Wiring ESP8266 to un arduino UNO

Posted: Wed Sep 13, 2017 4:59 pm
by ffoo31
hank you very much
I followed the instructions, result: upturn carried out without problem
But the LED does not send any signal.
connection:

from GND to LED
from Pin D2 to 20ohm resistance to Led
I tried without resistance but the problem persists

there is no voltage between G and D2.

it encloses the code used:

Code: Select all

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

IRsend irsend(4); // An IR LED is controlled by GPIO pin 4 (D2)

// Example of data captured by IRrecvDumpV2.ino
//IRsend irsend;

uint16_t rawData[195] = { 3148, 4428, 724, 464, 696, 1524, 672, 516, 672, 1528, 676, 516, 692, 1500, 676, 492, 716, 1508, 676, 516,
692, 496, 672, 516, 668, 528, 672, 516, 672, 520,
672, 496, 688, 524, 676, 516, 672, 516, 672, 516,
672, 524, 672, 516, 672, 1524, 672, 1524, 672, 500,
696, 516, 672, 496, 692, 516, 672, 524, 672, 520,
672, 516, 672, 516, 672, 520, 676, 1520, 676, 516,
668, 520, 672, 524, 672, 516, 672, 1524, 672, 516,
672, 520, 676, 1500, 696, 516, 672, 516, 672, 504,
692, 516, 672, 516, 676, 512, 676, 1528, 672, 520,
668, 520, 672, 496, 692, 520, 676, 1524, 672, 512,
672, 1524, 672, 524, 668, 520, 676, 516, 672, 516,
672, 504, 692, 516, 672, 516, 676, 492, 696, 524,
676, 512, 676, 516, 672, 496, 692, 504, 692, 516,
672, 516, 676, 516, 672, 520, 676, 516, 672, 516,
672, 520, 668, 524, 672, 516, 676, 516, 672, 496,
692, 524, 672, 516, 672, 516, 676, 512, 676, 520,
672, 520, 672, 516, 672, 516, 672, 524, 672, 516,
672, 516, 672, 1524, 672, 1528, 672, 1524, 672, 1504,
692, 1500, 696, 1520, 672 };

void setup()
{
Serial.begin(115200);
}

void loop() {
irsend.sendRaw(rawData,195,38);

delay(3000);

}
thanks

Re: Wiring ESP8266 to un arduino UNO

Posted: Wed Sep 13, 2017 5:15 pm
by AnalysIR
The resistor value you have will try to send 100mA thru the IR LED.

However, the max current from a GPIO pin on the ESP8266 is 12mA (I believe).

So you should change the resistor value to at least 175R (ohms).

However, this will not have much if any range....so you should try to use a transistor based driver circuit ( examples via web search or on our blog).
https://www.analysir.com/blog/2013/11/2 ... d-circuit/

or consider our more advanced & high power SendIR module with dual emitters via https://www.analysir.com/blog/product/s ... er-module/

Re: Wiring ESP8266 to un arduino UNO

Posted: Wed Sep 13, 2017 8:06 pm
by ffoo31
OK,
to decide between ESP and LedIR. I replaced the led IR with a limune LED.
but no sign of life.
is the upturn correct? because there is an error message at the bottom tells me that: no valid library found in: c: users / hp / documents / arduino / arduino-masters
Capture.PNG

Re: Wiring ESP8266 to un arduino UNO

Posted: Thu Sep 14, 2017 9:47 pm
by ffoo31
Good evening
I solved the problem.
it was necessary to replace Serial.begin (115200) by irsend.begin ();
the IR LED sends the signal to the A / C and it works

Note: I did not add any resistance to the IR led.
is it interesting to add a transistor stabilizer to 5V to power the LEd?

now I will lean in sending this signal from the outside,
please point me to topic.
thank you

Re: Wiring ESP8266 to un arduino UNO

Posted: Tue Sep 19, 2017 1:28 pm
by AnalysIR
please point me to topic.
I can only suggest https://www.analysir.com/blog/ or a web search.