Hello guys again! Have a problem with compilation of my project.
//#define BLYNK_DEBUG
//#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <ESP8266_SoftSer.h>
#include <BlynkSimpleShieldEsp8266_SoftSer.h>
#define ESP8266_USE_SOFTWARE_SERIAL
#include <SoftwareSerial.h>
// Set ESP8266 Serial object
SoftwareSerial EspSerial(2, 3); // RX, TX
ESP8266 wifi(EspSerial);
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";
void setup()
{
// Set console baud rate
Serial.begin(9600);
delay(10);
// Set ESP8266 baud rate
// 9600 is recommended for Software Serial
EspSerial.begin(9600);
delay(10);
Blynk.begin(auth, wifi, "ssid", "pass");
}
void loop()
{
Blynk.run();
}
Shows error below:
What can be problem of fault compilation???
You probably have selected a wrong Board in Arduino IDE.
Selected generic esp8266. And esp_tool programmaror.
In this case, use esp standalone example, not the serial modem
Then question. How can i use serial in my esp to communicate with other devices, for example, arduino mega. I want to send control commands through tx channel of esp8266 to mega accordingly to buttons pressed in blynk app. And receive data from sensors, that connected to arduino mega, through rx channel of esp8266.
Shall i use only SoftwareSerial library. Or i need something else to activate serial port on pins of my esp8266.
I understood my problem. I must to select arduino mega if i use sketch ESP8266_SoftwareSerial. But i have another question. If i use hardserial sketch and load in arduino mega, then what sketch (standard by manufacturer or ESP8266_Standalone) i have to upload in esp8266 sheild for communication of arduino mega and esp8266 via serial interface?
Please need your opinion and excuse me for bad writing. Not so good at english.
If you want to run Blynk on the Mega you need to load the AT firmware in the ESP (standard from manufacturer I think). There is no code needed.
Thank you for fast response)))