Great video! The vertical line character is generally referred to as a "pipe". I don't know if it has an official grammatical name, but it's pipe for coders.
Thanks for sharing a few pieces of the puzzle. Excellent video, and your time spent explaining your code is very much appreciated. All of this sort of stuff is logical and makes perfect sense, once the ice is broken. But, there are always a truckload of simple and logical things to work through. I think this project has a real chance of sparking many terrific ideas over time.
Hello David, Since I don´t have that little OLED but instead have a 16×2 LCD I'm going to try adapting your code and get it working. Thanks a lot for sharing!
Hey David, I am currently working on a senior project at school and am wanting to be able to interface our AGV using a browser or program (I was considering using some visual basic) using an Arduino Mega. I noticed in the video you were using a capacitor in the circuit that you didn't include on the pictured schematic is this component needed or is the regulator by itself ok to use?
Love the tutorial , is it possible that you can share another one with server feature, in it .I understand it already has the server mode (AT+CIPSERVER=1,80), but haven't been able to properly setup and run the same due to looping and data length handle logic issues.
Hey, I have found an app called BLYNK that allows for wifi communication i am just wondering would the Blynk App Communicate directly to the 8266 chip or does it need a router/ external wifi connection to communicate? I want to have this setup in my car away from routers and service and just want the phone to act wireless to the arduino to turn on lighting and things in the car. thanks in advance
Great video! You brought me litght in such confusing world I'm just starting. Why should I change the baud ratio from 115200 to 9600? I just bought a cloned Arduino UNO and a ESP8266 module with a firmware of this year. I test it sending AT commands from Serial console and I works fine. Thanks!
I know this is an older question but it is a common one. I suspect in this case it is related to using a breadboard and interconnecting wires, rather than a shielded cable and/or twisted pair. While other possibilities exist related to hardware, or the software library used, it is common to limit asynchronous communication to 9600 when using a breadboard. Breadboards and jumper wires are more susceptible to noise, and stray capacitance in the breadboard and wiring can also attenuate signals at higher speeds. While faster rates might work, 9600 is great rate for reliability when using a breadboard and jumper wires.
hi there,thnx for the great tut. i've connected the arduino uno to esp8266 module. when its connected to RX&TX pins with blank skitch it communicates and recieve AT commands. what whenever i connect to other pins it dosnt respond even when i define the pins within the softwareSerial. please help ...
Hi Dave Could you let me know whether the same can be implemented with arduino nano. What is the board that i must select?? Is it arduino nano or generic esp8266 module??
thanks and much appreciated but i have one question about regulator,the regulator is used to drop down the 5 volt to 3.3 volt,but at the arduino board there is also a supply of 3.3 volt is available then why we are not ready to connect to 3.3v instead of using regulator...?
Thats right: inside the arduino is also a voltage regulator, since the esp needs up to 200mA the voltage from the arduino will drop down so it is advisable to use any external voltage supply
hello sir. Great video. Is it not okay to use the 3.3V from arduino directly instead of 5v? so I can use my esp8266 even I don't have 3.3v voltage regulator.
So far all I can do is turn on an led with a nodemcu dev board. Every time I want to change code I have to clear eprom first. How can I add pin function in pre written code? How can I get included sketches to show up in individual tabs? Can I eventually control drivers/steppers with esp8266? Why didn't I learn all this when I was 18 instead of getting laid? :)))))
Hi David, Thanks for sharing this. is it possible to connect an arduino with ESP8266 to a mobile internet as a wifi if we don't have access to any local wifi. just wondering if i can use my phone internet to allow the arduino with esp8266 to send data to a webserver to save to a database. Thanks
Hi david thanks for such great tutorial , I am having issues that module have no response .My esp8266 is not communicating with aurdino uno Can u plz help me out
Hi Dave, Is it necessary to always flash the firmware into a new ESP8266 module before programming it with our codes OR does it come pre-flashed with the firmware as factory setting ? In case we have to flash the firmware at any stage where to download this firmware ?
Bit of a late response but maybe it will help others. The ESP8266 Modules all come with a preinstalled firmware which uses those AT commands in the video. If you just want to use them as a wifi module for an arduino you can do it as demonstrated in the video. You will find all the commands in this pdf: www.espressif.com/sites/default/files/documentation/4a-esp8266_at_instruction_set_en.pdf But the fancy thing about those modules is their inbuild processor with its in Pins which can be used as a standalone microprocessor itself . There are multiple ways to programm them but the simplest is to flash a arduino based firmware on it. I would recommend the later iterations of the board for that because it has more GPIO Pins and inbuilt ADC, SPI compatibility & stuff. Instructions on how to flash the arduino firmware that can found here: create.arduino.cc/projecthub/ROBINTHOMAS/programming-esp8266-esp-01-with-arduino-011389 If you do this the old serial based AT firmware wil obviously be lost but can be reflashed. Hope this helps someone
I have arduino mega and I wont to conect esp same type the code right but the problem when I up it on arduino the serial not work I sent AT more time but nothing happened ...
I need to ask one question. Say I want to put esp 01 wifi to my led matrix display board and i want to change the text anytime through that wifi then how do I do it?
For that you will need to directly program the ESP8266, not really the right video for that. Search for how to send variables to an esp8266, using the ESP as a webserver would be the easiest approach IMO
Nice job, nice code! Regarding your (arduino) code, what is "bool breakOut = false;" line standing for ? It's not called at all afterwards... Are you planning to add more features, or is it just something you forgot to remove ?
Alexandre EYLER Thanks mate, breakOut was used in the main loop before I used a switch statement. It looks like I forgot to remove it. I am adding some new features/functions and I am trying to get rid of all of the delay(5000) bits from the code. The success flag will also be changing since it triggers at the wrong point.
David Watts Okay. The switch method is a nice idea. The delay(5000) is a safe method to be sure that the module manages to initiate and connect to network and so on, but it slows the whole thing. On my first test with the ESP8266 I had used a loop reading the output from the module, so it could go to the next step as soon as possible, but it got stuck sometimes. Don't know if the weak part was the Arduino or the ESP. Need to do more tests :) I will follow your code updates for new features :)
I heard on another video that the reason why the 3.3 V arduino supply isn't enough is because it's being powered via USB. If you use the adaptor power supply (9 V) then the 3.3 V pin can supply enough for the ESP. Is this true?
+Jason Axford Hi, I didn't find that to be the case. It could depend on your board though, clones and real Arduino boards often have different regulators.
Hi david, If i'm connected to the wifi with the esp8266 does it means that the arduino is also connected to the internet? i'm trying to connect my arduino to the internet so i can creat an client-server programme i don't want to use an ethernet-shield so that's why i want to use the esp8266 is that's possible?
+Hassan Ben Lebsir Yes, the esp8266 acts as a gateway to the internet. Adafruit has some fully featured libraries you can use with examples of client server behaviour.
+David Watts David thank you for the fast reply. so basically what i'm trying to do is create a java application which can receive data from the arduino trough the wifi using the esp8266.what i' thinking is to create a client-server arduino is the client and the computer where the java application is the server Do you think that's the easiest way?
+Hassan Ben Lebsir I am afraid it is a little outside my realm of experience - Peter Scargill has some great resources on the ESP8266 that might point you in the right direction tech.scargill.net/esp8266-as-an-access-point.
i am making robot car...in that i am using esp 8266..help me how can i connect with arduino and code in that ...i want to make desktop application to control car from that application???
It was just using serial commands to control the ESP, this video sort of pre-dates common methods to program it directly with any of the languages I understand.
IS ARDUINO UNO 3.3V POWER SUFFICIENT FOR ESP( 01) 8266? AM GETTING ERROR MESSAGE WHILE UPLOADING warning: espcomm_sync failed error: espcomm_open failed error: espcomm_upload_mem failed, PLS REPLY MR . DAVID WATTS..........
hello, My esp8266 isn't working; even the LED on esp8266 isn't blinking. Do I need to flash the firmware? Please note that I am using Arduino UNO(chinese version) as serial converter and I am Arduino IDE serial monitor to get the response. Please guide in this regard as I am no where. Thanks.
Dear, I have done as you said connected CH_PD and VCC to 2.8v and GND to 0v. but no led blinking :( Observed one thing that when I un-plug the esp_GND I get 2.8 volts as power supply but when I connect esp_GND to my power_supply_GND I get 0.8V. Is this alarming ?
Yes, I would be worried about that. 0.8v at your power supply would suggest that your power supply cannot supply the current the module needs or you have a direct short. The module needs at least 300ma.
+smoke264 Hi Buddy, the code is in the description. If you don't want barebones code I would recommend an ESP8266 library though. Your voltage divider can be calculated here - lab.bitluni.net/voltagedivider a 20K and a 10K should do it. I think the cap is just a 100 microfarad one.
+videokolya It is a function to store the string in flash memory rather than RAM. I would have used it to free up the amount of available memory for variables but wanted it still to appear in context rather than as a variable itself. playground.arduino.cc/Learning/Memory
Can you pls show how to code to send the data to the server. Would it be possible to make the POST request? I have similar code but unable to POST the data to the server as it gives 400 bad request.
My code won't do post requests but you could modify it. This video and code was made before libraries were readily available for the ESP modules, I would recommend using a library rather than using serial commands in your main code these days.
Hi David, I am using ESP8266 with Arduino Mega and Voltage Regulator is LM1117. But unfortunately it is not connecting with wifi. Can you help me? Thanks Shivam
+Shivam Chove Hi Chivam, It is a bit difficult to diagnose problems with the ESP8266-01 without actually seeing it. I suggest you post in the Google+ Arduino Community Group and add pictures and code so that members can help you out.
+David Watts The schematic for the 3v3 voltage regulator shown in the video at 1:13 is wrong if you are using the LM1117T, as its right pin-out is first pin for GND, second for Output, and third for Input.
HI , i dont have a 3.3v linear voltage regulator so i was thinking of using resistor (Voltage drop ) using 3k3 and 8k2 registers. can you just draw me a schematic using those registers instead of this please ???
+David Watts i tired with a separate 3.3v supply, its working fine.but when i upload the code ,it shows ESP8266 Demo Sketch Reset: General error i had flashed the firmware also,even then this error keeps on coming.. help me...
for example , I clicked on the link you provided and selected esp8266.php . clicked raw . copied entire text . opened Arduino 1.6.11 . pasted code . clicked on verify . it gave me error :( stray '$' in program ). it does this with many different codes I try to copy and paste . but its different message . but this one I want to fix because I want to understand how to use the esp8266.
jesse chavez The PHP file is not for the Arduino, that is for a server environment. You do not need it, it is for people who have their own servers. There should be a link to other code in the description for the Arduino.
Hello David. I just ordered 3 of them off of ebay a couple of days ago. But I ordered the ones that are FCC certified. In any case, instead of using your own web site to get date time, why don't you just issue a get request to google.com (or any other reliable site) and get the GMT time from the response header? I just googled for this and found this code..... Dang, YT won't let me paste the code here. I googled "ESP8266 Teensy Time Date from request headers site:www.cse.dmu.ac.uk"
***** Thanks Eric, I have been on Ian Sexton's website and met him IRL. His stuff is a great place to get started. Getting the time is really just a perk with the ESP8266, my main goal was sending and receiving data in general. I can pull the time from a data string after sending data to the page as a URL variable. I am hoping to stream line to code and make reliable updates faster, at the moment it takes around 20 seconds per stable update.
David Watts Nice... yes, he is a smart man. I've booked marked him to read more of his posts when I have more time. I bought the Spark Core and when it works, it works great but I just have way too many issues with it. Probably just me being stupid. But this in combination with a Pro Trinket will be my Spark Core replacement. I have a little store bought temperature display with clock beside my computer that I want to replace with my home made one. One that can also pull in some some twitter information for me. Well, that is what I am going to do with mine when I get them. :)
***** The ATTiny 85 doesn't have one, the chip the trinket uses, but I thought they might have done something with the USB interface. Software serial might work but unfortunately it won't leave you with many pins.
Hi David, Thanks for the video! First of all, apologies! for the long post, I am learning and novice to Arduino. Few questions first Q1. Are you connecting GPIO0 to GND for flashing the code. Q2. I am using LM7805 as 3.3V linear regulator, but I'm getting 3.7V as output. Is it OK? Q3. I have attached 100 microF capacitor between GND pin and OUTPUT pin. Is it OK? Q4. Can you explain us your bread board wiring other than the one which is there in the video? Q5. I have not flashed a OS on my ESP8266 12E. Is there any Arduino code to flash the OS in the WiFI module? Please suggest a way to do it. Q6. I have compiled your code available on github.com/mrdavidjwatts/esp8266Module. I am getting following errors: Arduino: 1.6.7 (Mac OS X), Board: "Generic ESP8266 Module, 80 MHz, 40MHz, DIO, 115200, 512K (64K SPIFFS), ck, Disabled, None" sketch/esp8266-Full-Menu-System-v1.ino.cpp.o:(.text._ZN6U8GLIB5writeEh[U8GLIB::write(unsigned char)]+0x0): undefined reference to `u8g_DrawGlyph' sketch/esp8266-Full-Menu-System-v1.ino.cpp.o: In function `U8GLIB::write(unsigned char)': /Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_DrawGlyph' sketch/esp8266-Full-Menu-System-v1.ino.cpp.o: In function `splitToVal(String, String, String)': /Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_font_8x13B' /Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_font_5x8' sketch/esp8266-Full-Menu-System-v1.ino.cpp.o:(.text._Z11displayShowv+0x70): undefined reference to `u8g_SetFont' sketch/esp8266-Full-Menu-System-v1.ino.cpp.o:(.text._Z11displayShowv+0x74): undefined reference to `u8g_DrawTriangle' sketch/esp8266-Full-Menu-System-v1.ino.cpp.o:(.text._Z11displayShowv+0xaf): undefined reference to `u8g_SetFont' sketch/esp8266-Full-Menu-System-v1.ino.cpp.o:(.text._Z11displayShowv+0xd2): undefined reference to `u8g_SetFont' sketch/esp8266-Full-Menu-System-v1.ino.cpp.o:(.text._Z11displayShowv+0x12c): undefined reference to `u8g_SetFont' sketch/esp8266-Full-Menu-System-v1.ino.cpp.o:(.text._Z11displayShowv+0x149): undefined reference to `u8g_SetFont' sketch/esp8266-Full-Menu-System-v1.ino.cpp.o: In function `displayShow()': /Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_SetFont' sketch/esp8266-Full-Menu-System-v1.ino.cpp.o:/Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: more undefined references to `u8g_SetFont' follow sketch/esp8266-Full-Menu-System-v1.ino.cpp.o: In function `U8GLIB::setPrintPos(unsigned char, unsigned char)': /Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_DrawTriangle' sketch/esp8266-Full-Menu-System-v1.ino.cpp.o: In function `displayShow()': /Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_DrawTriangle' /Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_SetFont' sketch/esp8266-Full-Menu-System-v1.ino.cpp.o: In function `U8GLIB::setPrintPos(unsigned char, unsigned char)': /Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_SetFont' /Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_SetFont' sketch/esp8266-Full-Menu-System-v1.ino.cpp.o: In function `displayShow()': /Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_SetFont' /Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_SetFont' /Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_dev_ssd1306_128x64_i2c' sketch/esp8266-Full-Menu-System-v1.ino.cpp.o: In function `runEsp8266(String, String)': /Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:680: undefined reference to `u8g_Begin' /Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:681: undefined reference to `u8g_FirstPage' /Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:681: undefined reference to `u8g_NextPage' sketch/esp8266-Full-Menu-System-v1.ino.cpp.o: In function `loop': /Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:690: undefined reference to `u8g_Begin' /Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:692: undefined reference to `u8g_FirstPage' /Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:692: undefined reference to `u8g_NextPage' libraries/src/U8glib.cpp.o:(.text._ZN6U8GLIB7initI2CEP10_u8g_dev_th+0x0): undefined reference to `u8g_InitI2C' libraries/src/U8glib.cpp.o: In function `U8GLIB::initI2C(_u8g_dev_t*, unsigned char)': /Users/Girish/Documents/Arduino/libraries/src/U8glib.cpp:57: undefined reference to `u8g_InitI2C' collect2: error: ld returned 1 exit status exit status 1 Error compiling. This report would have more information with "Show verbose output during compilation" enabled in File > Preferences. How to remove it? PS: It does not include library files for U8glib.h which you should mention in your video. I have downloaded them separately from github.com/olikraus/u8glib
+Girish Suri The errors you are getting there are just from the u8glib library not being installed. You should be able to fully install it from the manage libraries menu. I would recommend starting with the basic example or if you are not comfortable playing around with the code there are quite a few fully featured libraries around.
+Girish Suri Q1 - I would recommend following tutorials on esp8266.com if you want to flash the module. Q2 - Ar you using a diode to drop the 5v from the 7805? Q3 - You capacitor should be between vcc and gnd. Q4 - It was really just a demo, I would always suggest stating from the base code example which is simply wiring up the esp8266 as a serial interface. Q5 - Linked to Q1
LOL, Yeah I forgot how you Brits massacre the King's english, say "Aluminum" , see what I mean. Just kidding though I really like your Vids, keep it up.
You should win a Nobel! After one week searching how to do it, finally someone helped me. Thank you!
Great video!
The vertical line character is generally referred to as a "pipe". I don't know if it has an official grammatical name, but it's pipe for coders.
Thanks, good to know.
Thanks for sharing a few pieces of the puzzle. Excellent video, and your time spent explaining your code is very much appreciated. All of this sort of stuff is logical and makes perfect sense, once the ice is broken. But, there are always a truckload of simple and logical things to work through. I think this project has a real chance of sparking many terrific ideas over time.
Thanks for the video. I always enjoy your presentations.
This is your best video yet. Perfect !!
Hello David,
Since I don´t have that little OLED but instead have a 16×2 LCD I'm going to try adapting your code and get it working.
Thanks a lot for sharing!
Ricardo Gisbert did u get it to work?
Finally a clear instruction video, thanks. Would it be hard to show a function where you SEND data to the web, instead of just retrieving it?
+Martijn Rijnja You could use the name of the webpage you retrieve to send data (i.e. the vars on the php page ?var=3214&meow=blah etc etc)
hey David,
what is the name of the capacitor and regulator your using
Thanks
Hey David,
I am currently working on a senior project at school and am wanting to be able to interface our AGV using a browser or program (I was considering using some visual basic) using an Arduino Mega. I noticed in the video you were using a capacitor in the circuit that you didn't include on the pictured schematic is this component needed or is the regulator by itself ok to use?
Love the tutorial , is it possible that you can share another one with server feature, in it .I understand it already has the server mode (AT+CIPSERVER=1,80), but haven't been able to properly setup and run the same due to looping and data length handle logic issues.
Hey, I have found an app called BLYNK that allows for wifi communication i am just wondering would the Blynk App Communicate directly to the 8266 chip or does it need a router/ external wifi connection to communicate?
I want to have this setup in my car away from routers and service and just want the phone to act wireless to the arduino to turn on lighting and things in the car.
thanks in advance
Great video! You brought me litght in such confusing world I'm just starting. Why should I change the baud ratio from 115200 to 9600? I just bought a cloned Arduino UNO and a ESP8266 module with a firmware of this year. I test it sending AT commands from Serial console and I works fine. Thanks!
I know this is an older question but it is a common one. I suspect in this case it is related to using a breadboard and interconnecting wires, rather than a shielded cable and/or twisted pair. While other possibilities exist related to hardware, or the software library used, it is common to limit asynchronous communication to 9600 when using a breadboard. Breadboards and jumper wires are more susceptible to noise, and stray capacitance in the breadboard and wiring can also attenuate signals at higher speeds. While faster rates might work, 9600 is great rate for reliability when using a breadboard and jumper wires.
Thank you Mr. David.
Is there a way to connect with the "ESP8266" from "an Android" App to control some relays connected to an "Arduion UNO"?
hi there,thnx for the great tut.
i've connected the arduino uno to esp8266 module. when its connected to RX&TX pins with blank skitch it communicates and recieve AT commands. what whenever i connect to other pins it dosnt respond even when i define the pins within the softwareSerial. please help ...
Arduino uno only has 1 serial port, can we just use 1 single serial port to communicate with esp8266 wifi module ? Thanks
Hi Dave
Could you let me know whether the same can be implemented with arduino nano. What is the board that i must select??
Is it arduino nano or generic esp8266 module??
Would you know how to use the ESP8266 module with an Arduino UNO as a wifi range extender, and what kind of coding to use?
thanks and much appreciated but i have one question about regulator,the regulator is used to drop down the 5 volt to 3.3 volt,but at the arduino board there is also a supply of 3.3 volt is available then why we are not ready to connect to 3.3v instead of using regulator...?
Thats right: inside the arduino is also a voltage regulator, since the esp needs up to 200mA the voltage from the arduino will drop down so it is advisable to use any external voltage supply
hello sir. Great video. Is it not okay to use the 3.3V from arduino directly instead of 5v? so I can use my esp8266 even I don't have 3.3v voltage regulator.
Hi David, I want to configure esp 8266 with tiva launchpad?? Could you please guide me through the procedure??
So far all I can do is turn on an led with a nodemcu dev board. Every time I want to change code I have to clear eprom first. How can I add pin function in pre written code?
How can I get included sketches to show up in individual tabs? Can I eventually control drivers/steppers with esp8266? Why didn't I learn all this when I was 18 instead of getting laid? :)))))
Have you try with thingspeak web page in oder to send data in remote instrumentation? What ESP8266 firmware do you rcomend? please help.
Can it be used for Access point creation?
Hi David,
Thanks for sharing this.
is it possible to connect an arduino with ESP8266 to a mobile internet as a wifi if we don't have access to any local wifi. just wondering if i can use my phone internet to allow the arduino with esp8266 to send data to a webserver to save to a database.
Thanks
Yes, the esp8266 can connect to a mobile hotspot.
Hi david
thanks for such great tutorial , I am having issues that module have no response .My esp8266 is not communicating with aurdino uno
Can u plz help me out
Hi Dave,
Is it necessary to always flash the firmware into a new ESP8266 module before programming it with our codes OR does it come pre-flashed with the firmware as factory setting ?
In case we have to flash the firmware at any stage where to download this firmware ?
Bit of a late response but maybe it will help others.
The ESP8266 Modules all come with a preinstalled firmware which uses those AT commands in the video.
If you just want to use them as a wifi module for an arduino you can do it as demonstrated in the video.
You will find all the commands in this pdf:
www.espressif.com/sites/default/files/documentation/4a-esp8266_at_instruction_set_en.pdf
But the fancy thing about those modules is their inbuild processor with its in Pins which can be used as a standalone microprocessor itself . There are multiple ways to programm them but the simplest is to flash a arduino based firmware on it. I would recommend the later iterations of the board for that because it has more GPIO Pins and inbuilt ADC, SPI compatibility & stuff.
Instructions on how to flash the arduino firmware that can found here:
create.arduino.cc/projecthub/ROBINTHOMAS/programming-esp8266-esp-01-with-arduino-011389
If you do this the old serial based AT firmware wil obviously be lost but can be reflashed.
Hope this helps someone
How do I get the esp2866-base-code-clean code? Your GitHub repository doesn't seem to have it.
+Gary Grotsky It is the same code just a different filename in the video.
I have arduino mega and I wont to conect esp same type the code right but the problem when I up it on arduino the serial not work I sent AT more time but nothing happened ...
I need to ask one question. Say I want to put esp 01 wifi to my led matrix display board and i want to change the text anytime through that wifi then how do I do it?
For that you will need to directly program the ESP8266, not really the right video for that. Search for how to send variables to an esp8266, using the ESP as a webserver would be the easiest approach IMO
@@DavidWatts Allright thanks for the advice.
Nice job, nice code!
Regarding your (arduino) code, what is "bool breakOut = false;" line standing for ?
It's not called at all afterwards...
Are you planning to add more features, or is it just something you forgot to remove ?
Alexandre EYLER Thanks mate, breakOut was used in the main loop before I used a switch statement. It looks like I forgot to remove it.
I am adding some new features/functions and I am trying to get rid of all of the delay(5000) bits from the code. The success flag will also be changing since it triggers at the wrong point.
David Watts Okay.
The switch method is a nice idea.
The delay(5000) is a safe method to be sure that the module manages to initiate and connect to network and so on, but it slows the whole thing.
On my first test with the ESP8266 I had used a loop reading the output from the module, so it could go to the next step as soon as possible, but it got stuck sometimes. Don't know if the weak part was the Arduino or the ESP. Need to do more tests :)
I will follow your code updates for new features :)
I heard on another video that the reason why the 3.3 V arduino supply isn't enough is because it's being powered via USB. If you use the adaptor power supply (9 V) then the 3.3 V pin can supply enough for the ESP. Is this true?
+Jason Axford Hi, I didn't find that to be the case. It could depend on your board though, clones and real Arduino boards often have different regulators.
OK. Cheers. I'll get a separate power supply board then.
Hi david,
If i'm connected to the wifi with the esp8266 does it means that the arduino is also connected to the internet?
i'm trying to connect my arduino to the internet so i can creat an client-server programme i don't want to use an ethernet-shield so that's why i want to use the esp8266 is that's possible?
+Hassan Ben Lebsir Yes, the esp8266 acts as a gateway to the internet. Adafruit has some fully featured libraries you can use with examples of client server behaviour.
+David Watts David thank you for the fast reply. so basically what i'm trying to do is create a java application which can receive data from the arduino trough the wifi using the esp8266.what i' thinking is to create a client-server arduino is the client and the computer where the java application is the server
Do you think that's the easiest way?
+Hassan Ben Lebsir I am afraid it is a little outside my realm of experience - Peter Scargill has some great resources on the ESP8266 that might point you in the right direction tech.scargill.net/esp8266-as-an-access-point.
i am making robot car...in that i am using esp 8266..help me how can i connect with arduino and code in that ...i want to make desktop application to control car from that application???
Great video! Thank you for that!
+Ali Askari Thanks mate
So is that code running on the ESP8266 onboard Arduino or the master Arduino?
It was just using serial commands to control the ESP, this video sort of pre-dates common methods to program it directly with any of the languages I understand.
Hello
Do you send the code to the arduino or the esp module?
IS ARDUINO UNO 3.3V POWER SUFFICIENT FOR ESP( 01) 8266? AM GETTING ERROR MESSAGE WHILE UPLOADING warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed,
PLS REPLY MR . DAVID WATTS..........
Hi, you can check this page for hints about that kind of error - learn.sparkfun.com/tutorials/esp8266-thing-hookup-guide/discuss
hello,
My esp8266 isn't working; even the LED on esp8266 isn't blinking. Do I need to flash the firmware?
Please note that I am using Arduino UNO(chinese version) as serial converter and I am Arduino IDE serial monitor to get the response.
Please guide in this regard as I am no where. Thanks.
You can follow the instructions here to flash your esp8266 - www.xess.com/blog/esp8266-reflash/
I guess connecting the esp_vcc to 3.3v and esp_gnd to ground should blink the led. but that is not the case. what do you say David ?
Saqib Sohail CH_PD should also be connected to 3.3v. I believe you should at least see a red power led.
Dear,
I have done as you said connected CH_PD and VCC to 2.8v and GND to 0v. but no led blinking :(
Observed one thing that when I un-plug the esp_GND I get 2.8 volts as power supply but when I connect esp_GND to my power_supply_GND I get 0.8V. Is this alarming ?
Yes, I would be worried about that. 0.8v at your power supply would suggest that your power supply cannot supply the current the module needs or you have a direct short. The module needs at least 300ma.
great video sir but what if we connect two arduino .....like
arduino 1st >>>>>esp8266 1st..............esp82662nd
Just wondering, where can I get the arduino code and the specifications of the capacitor and the voltage divider?
+smoke264 Hi Buddy, the code is in the description. If you don't want barebones code I would recommend an ESP8266 library though. Your voltage divider can be calculated here - lab.bitluni.net/voltagedivider a 20K and a 10K should do it. I think the cap is just a 100 microfarad one.
thanks
Setup ESP8266 from Arduino: ruclips.net/video/ejneUvkALnQ/видео.html
What is F() function? i.e. esp8266Module.println(F("AT+RST"));
+videokolya It is a function to store the string in flash memory rather than RAM. I would have used it to free up the amount of available memory for variables but wanted it still to appear in context rather than as a variable itself. playground.arduino.cc/Learning/Memory
Can you pls show how to code to send the data to the server. Would it be possible to make the POST request? I have similar code but unable to POST the data to the server as it gives 400 bad request.
My code won't do post requests but you could modify it. This video and code was made before libraries were readily available for the ESP modules, I would recommend using a library rather than using serial commands in your main code these days.
do i need an esp 8266 library?
I want to connect a camera module to stream live video on to my browser. Is it possible?
+Bhargav Sorry mate, I don't know.
+David Watts Thanks for the reply man
Hi David,
I am using ESP8266 with Arduino Mega and Voltage Regulator is LM1117. But unfortunately it is not connecting with wifi.
Can you help me?
Thanks
Shivam
+Shivam Chove Hi Chivam,
It is a bit difficult to diagnose problems with the ESP8266-01 without actually seeing it. I suggest you post in the Google+ Arduino Community Group and add pictures and code so that members can help you out.
+David Watts The schematic for the 3v3 voltage regulator shown in the video at 1:13 is wrong if you are using the LM1117T, as its right pin-out is first pin for GND, second for Output, and third for Input.
HI , i dont have a 3.3v linear voltage regulator so i was thinking of using resistor (Voltage drop ) using 3k3 and 8k2 registers.
can you just draw me a schematic using those registers instead of this please ???
That is a bad idea, your voltage divider output will change with input voltage and likely with output current at ESP8266 levels.
That is indeed a bad idea , but it works !!
rushic24 Cool, I would love to hear how it holds up in long term use. The ESP8266 can pull quite a lot of curent at times.
Can u Give me the schematic diagram to connect tx and rx using resistors to convert it to a 3.3v
Just a simple 'resistor (voltage) divider', google that phrase and it should throw up a calculator or a schematic.
On the schematic you don't use the capacitor. Why do you use it on the breadboard?
Just force of habit, I didn't need it. It was a 10uf I think.
Thank you sir.
why do you need the linear voltage regulator , why cant you use the 3.3v from the Arduino?
The voltage regulator can be a little weak on clone boards, there is a fair amount of peak current required at 3.3v.
+David Watts I have an original arduino, it should work with 3.3 right?
Usually doesn’t work with the 3.3 v pin as the current is too low, use a dedicated power supply or the voltage regulator
He explains why in the video.. Did you even watch it?
Y do I need to flash the esp8266
how to create ip address of esp8266??
thanks
how can copy the code
Its really working ?
I got some error like
400 bad request !!!
Is there a way to connect the ESP8266 with an WiFi Router using WPS authentication???
Yeah, I think there is the WiFi.beginWPSConfig(); command
thanks!
power to my esp goes off when i connect CH_PD pin to 3.3v.
+yashwanth kumar it sounds like you need to run a separate 3.3v supply, it is probably trying to pull more current than your Arduino can provide.
+David Watts i tired with a separate 3.3v supply, its working fine.but when i upload the code ,it shows
ESP8266 Demo Sketch
Reset: General error
i had flashed the firmware also,even then this error keeps on coming..
help me...
yashwanth kumar What code are you uploading and to what board?
+David Watts GetIPaddress code to arduino nano to which esp is connected.
every time I copy and paste a code and then run the check on it it gives me error message.
You might need to be more specific.
for example , I clicked on the link you provided and selected esp8266.php . clicked raw . copied entire text . opened Arduino 1.6.11 . pasted code . clicked on verify . it gave me error :( stray '$' in program ). it does this with many different codes I try to copy and paste . but its different message . but this one I want to fix because I want to understand how to use the esp8266.
jesse chavez The PHP file is not for the Arduino, that is for a server environment. You do not need it, it is for people who have their own servers. There should be a link to other code in the description for the Arduino.
Excellent
can u send me the link of display board
www.aliexpress.com/item/Free-Shipping-0-96-inch-128X64-OLED-Display-Module-For-arduino-0-96-IIC-SPI-Communicate/32680966077.html
Hello David. I just ordered 3 of them off of ebay a couple of days ago. But I ordered the ones that are FCC certified.
In any case, instead of using your own web site to get date time, why don't you just issue a get request to google.com (or any other reliable site) and get the GMT time from the response header?
I just googled for this and found this code..... Dang, YT won't let me paste the code here.
I googled "ESP8266 Teensy Time Date from request headers site:www.cse.dmu.ac.uk"
***** Thanks Eric, I have been on Ian Sexton's website and met him IRL. His stuff is a great place to get started. Getting the time is really just a perk with the ESP8266, my main goal was sending and receiving data in general. I can pull the time from a data string after sending data to the page as a URL variable. I am hoping to stream line to code and make reliable updates faster, at the moment it takes around 20 seconds per stable update.
David Watts Nice... yes, he is a smart man. I've booked marked him to read more of his posts when I have more time.
I bought the Spark Core and when it works, it works great but I just have way too many issues with it. Probably just me being stupid. But this in combination with a Pro Trinket will be my Spark Core replacement. I have a little store bought temperature display with clock beside my computer that I want to replace with my home made one. One that can also pull in some some twitter information for me. Well, that is what I am going to do with mine when I get them. :)
***** Cool, I look forward to seeing a post about it. Does the trinket do hardware serial?
David Watts No, there is not. :( They say that that was not included to keep things tiny.
***** The ATTiny 85 doesn't have one, the chip the trinket uses, but I thought they might have done something with the USB interface. Software serial might work but unfortunately it won't leave you with many pins.
Hi David, Thanks for the video! First of all, apologies! for the long post, I am learning and novice to Arduino.
Few questions first
Q1. Are you connecting GPIO0 to GND for flashing the code.
Q2. I am using LM7805 as 3.3V linear regulator, but I'm getting 3.7V as output. Is it OK?
Q3. I have attached 100 microF capacitor between GND pin and OUTPUT pin. Is it OK? Q4. Can you explain us your bread board wiring other than the one which is there in the video?
Q5. I have not flashed a OS on my ESP8266 12E. Is there any Arduino code to flash the OS in the WiFI module? Please suggest a way to do it.
Q6. I have compiled your code available on github.com/mrdavidjwatts/esp8266Module. I am getting following errors:
Arduino: 1.6.7 (Mac OS X), Board: "Generic ESP8266 Module, 80 MHz, 40MHz, DIO, 115200, 512K (64K SPIFFS), ck, Disabled, None"
sketch/esp8266-Full-Menu-System-v1.ino.cpp.o:(.text._ZN6U8GLIB5writeEh[U8GLIB::write(unsigned char)]+0x0): undefined reference to `u8g_DrawGlyph'
sketch/esp8266-Full-Menu-System-v1.ino.cpp.o: In function `U8GLIB::write(unsigned char)':
/Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_DrawGlyph'
sketch/esp8266-Full-Menu-System-v1.ino.cpp.o: In function `splitToVal(String, String, String)':
/Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_font_8x13B'
/Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_font_5x8'
sketch/esp8266-Full-Menu-System-v1.ino.cpp.o:(.text._Z11displayShowv+0x70): undefined reference to `u8g_SetFont'
sketch/esp8266-Full-Menu-System-v1.ino.cpp.o:(.text._Z11displayShowv+0x74): undefined reference to `u8g_DrawTriangle'
sketch/esp8266-Full-Menu-System-v1.ino.cpp.o:(.text._Z11displayShowv+0xaf): undefined reference to `u8g_SetFont'
sketch/esp8266-Full-Menu-System-v1.ino.cpp.o:(.text._Z11displayShowv+0xd2): undefined reference to `u8g_SetFont'
sketch/esp8266-Full-Menu-System-v1.ino.cpp.o:(.text._Z11displayShowv+0x12c): undefined reference to `u8g_SetFont'
sketch/esp8266-Full-Menu-System-v1.ino.cpp.o:(.text._Z11displayShowv+0x149): undefined reference to `u8g_SetFont'
sketch/esp8266-Full-Menu-System-v1.ino.cpp.o: In function `displayShow()':
/Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_SetFont'
sketch/esp8266-Full-Menu-System-v1.ino.cpp.o:/Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: more undefined references to `u8g_SetFont' follow
sketch/esp8266-Full-Menu-System-v1.ino.cpp.o: In function `U8GLIB::setPrintPos(unsigned char, unsigned char)':
/Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_DrawTriangle'
sketch/esp8266-Full-Menu-System-v1.ino.cpp.o: In function `displayShow()':
/Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_DrawTriangle'
/Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_SetFont'
sketch/esp8266-Full-Menu-System-v1.ino.cpp.o: In function `U8GLIB::setPrintPos(unsigned char, unsigned char)':
/Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_SetFont'
/Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_SetFont'
sketch/esp8266-Full-Menu-System-v1.ino.cpp.o: In function `displayShow()':
/Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_SetFont'
/Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_SetFont'
/Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:832: undefined reference to `u8g_dev_ssd1306_128x64_i2c'
sketch/esp8266-Full-Menu-System-v1.ino.cpp.o: In function `runEsp8266(String, String)':
/Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:680: undefined reference to `u8g_Begin'
/Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:681: undefined reference to `u8g_FirstPage'
/Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:681: undefined reference to `u8g_NextPage'
sketch/esp8266-Full-Menu-System-v1.ino.cpp.o: In function `loop':
/Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:690: undefined reference to `u8g_Begin'
/Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:692: undefined reference to `u8g_FirstPage'
/Users/Girish/Google Drive/ArduinoProjects/esp8266Module-master/esp8266-Full-Menu-System-v1/esp8266-Full-Menu-System-v1.ino:692: undefined reference to `u8g_NextPage'
libraries/src/U8glib.cpp.o:(.text._ZN6U8GLIB7initI2CEP10_u8g_dev_th+0x0): undefined reference to `u8g_InitI2C'
libraries/src/U8glib.cpp.o: In function `U8GLIB::initI2C(_u8g_dev_t*, unsigned char)':
/Users/Girish/Documents/Arduino/libraries/src/U8glib.cpp:57: undefined reference to `u8g_InitI2C'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling.
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
How to remove it?
PS: It does not include library files for U8glib.h which you should mention in your video. I have downloaded them separately from github.com/olikraus/u8glib
+Girish Suri The errors you are getting there are just from the u8glib library not being installed. You should be able to fully install it from the manage libraries menu. I would recommend starting with the basic example or if you are not comfortable playing around with the code there are quite a few fully featured libraries around.
+Girish Suri Q1 - I would recommend following tutorials on esp8266.com if you want to flash the module. Q2 - Ar you using a diode to drop the 5v from the 7805? Q3 - You capacitor should be between vcc and gnd. Q4 - It was really just a demo, I would always suggest stating from the base code example which is simply wiring up the esp8266 as a serial interface. Q5 - Linked to Q1
Does this work for Arduino Uno?
+Aniket Ravan Yes, I am using an Arduino Uno clone.
where can i find u8glib.h?
You could google it or look here github.com/olikraus/u8glib/wiki
code plz
It is in the description
github.com/mrdavidjwatts/esp8266Module
Genius
nice
Please pronounce "Router" correctly...it is not "Rooter". Otherwise great video technically.
Pretty sure it is rooter at least it is in my neck of the woods. Happy to be corrected though.
LOL, Yeah I forgot how you Brits massacre the King's english, say "Aluminum" , see what I mean. Just kidding though I really like your Vids, keep it up.
Would you know how to use the ESP8266 module with an Arduino UNO as a wifi range extender, and what kind of coding to use?
+James Baker Sorry mate, no idea. Hopefully someone else will be able to give you an answer.