-->
Page 1 of 1

Arduino MEGA with ESP8266

PostPosted: Wed Feb 19, 2020 1:18 pm
by fasaso
Good afternoon,

i am trying and failing very hard to connect an arduino MEGA with an integrated ESP8266 module to Blynk.
Here is a link to my Arduino with additional description:

https://www.instructables.com/id/Arduino-MEGA-2560-With-WiFi-Built-in-ESP8266/

I have tried everything, but most of the videos are not in english. I have very little experience with ESP modules in general. I thought it would work with Blynk, but I don't know exactly what to insert in the example code generator. If I set the micro switches to CH340+MEGA2560+ESP8266 and switch to Arduino MEGA with serial communication in Blynk, I can see in the Serial Monitor that it is working. But when I try to select Adruino Mega with ESP8266 shield in Blynk (as far as I understand it the Arduino communicates with Rx and Tx with ESP) I can't upload the code because the two libraries are not installed but they are installed.

My goal is to be able to control the Arduino with 4-5 buttons on the smartphone and to display 1 analog value of the Arduino on the smartphone. With the buttons I want to program inputs in the program like with digital inputs, e.g. to control an LED with an if-function in which one of the buttons on the smartphone works as start condition

for help I would be much obliged

kind regards

fasaso

Re: Arduino MEGA with ESP8266

PostPosted: Thu Feb 20, 2020 1:31 am
by JurajA
one option (it has some constraints):
set CH340 to esp8266 and upload AT firmware 1.7.2 to esp8266.
then switch CH340 to ATmega and ATMega to esp8266 on Serial3
use my WiFiEspAT library, only change in examples Serial1 to Serial3
the library is in Library Manager. and it has the basic Blynk sketch in examples.
details: https://github.com/jandrassy/WiFiEspAT