Hi guys,
i bought an ESP8266-01 module to connect my arduino mega to wifi instead of using ethernet comunication for my school project. I tried a lots of things and read a lot but i didn’t undestand how to get this thing work.
Can someone explain me how to use this module like a wifi shield for my mega? And if this is too complicated as i red (i don’t have a lot of time before my exam) what should i buy to get this thing work? I know that i should Look for NodeMCU or Wemos D1 Mini boards but i have to get/show data from 2 sensor so i need at least 2 or 3 analogic pin (i alredy ahve a wemos d1 mini but it’s not enough for what i need).
Hi @Gonick,
I guess you are talking about analog sensors, in that case, as you already have a Wemos Mini D1, you would only need the small ADS1115 board to play with them.
Have a look at:
@Blynk_Coeur,
IMHO, ESP32 thing is complicated and not really user friendly, if I were @Gonick, I’ll start with something easier… it seems Gonick is just a beginner, correct me if I’m wrong…
Yeah, i’m a beginner but that’s not the problem. The problem is that this is a project for an exam and i have less than 30 days to do it so all the things than can help me and make my life easier are gratefully accepted
In that case, the combo Arduino Mega + ESP01 looks like your best option…
There’re lots of posts with information in this forum, I’ll provide you some tips:
Flash ESP-01 with AT commands.
Fix proper Baud-rate and Serial to communicate the ESP with the Arduino.
Check communication wires between them.
Generate the code taking into consideration that it’s an Arduino with the ESp as shield.
Search, search and search… and after that, ask good questions…
I tried A LOT to flash and get the 01 works but i just cant, it simply doesn’t work for me. Probably it’s my poor experience with blynk and arduino. I think that i will order that arduino MEGA with the 8266 already on it and see if it could help me.
I already have ALL the project and the sketch done on an ethernet shield but i want it on wifi
Flashing can be tricky at first… but It should have came with the needed AT code preinstalled.
Bad idea… those boards somehow manage to complicate a simple serial interface and almost never work quickly or properly with Blynk
This whole ESP as shield thing has been debated and documented soooo many times in this forum. It is a simple 2 wire crossover serial interface and requires a dedicated 3.3v PSU for the ESP… add in a couple of lines of code. That’s about it. I have ran into sensors that are more complicated
Search this forum for keywords like ESP as shield and remember the Mega uses Serial1 (pins 18 & 19) as a “normal” serial port AKA NOT Softwareserial.
That is just one of many ways of communicating to the ESP(ESP-01?) from a PC… in order to flash firmware or setup AT settings like BAUD. It is a USB to Serial adapter.
You can even use the Arduino itself… but the TX pin will put out 5v and many insist that the ESP’s RX pin will not last long at that voltage (normally 3.3v) but that is debatable… and resolvable with things like a simple voltage divider or level shifter circuit.
Meanwhile, here is one of many posts about the whole ESP as shield issue…
Ok so, this strange board arrived but it’s very tricky and difficult to use, at least both mega and esp. I didn’t find much, every post that i red send me back to a russian site with basic tests. I think that it will be impossible to use this thing properly with blynk, like you said. Tomorrow amazon should give me all the thing to try with the ESP-01
I have a couple of those Mega+WiFi boards and can confirm they can be extremely tricky to get working properly. I believe I know what I’m doing these days with ESP8266 boards and those have given me the most grief. I have managed to get one communicate through MQTT but was unable to make it work with the example Blynk scrips no matter what I did.
I would say both the ADS1115 with ESP8266 and the ESP32 by itself will be much simpler. The ESP32 Arduino port is starting to be quite mature and is not much different from the ESP8266 to code. The only caveat with either solution is the analog inputs cannot take 5V from 5V analog sensor modules without using a voltage divider.
I have had success with using the ESP8266 shield from sparkfun with the uno and the mega. (https://www.sparkfun.com/products/13287). If you are only using a few sensors then you could do it a lot easier with an uno, the shield sits right on top and the TX,RX pins are in the right positions so you wont have to jumper them like you would on the mega to get to 18/19. The shield from sparkfun also comes with its own arduino library with sample code to get you up and running. Hope this helps.