Chat here is you are connecting ESP-xx type modules to existing AVR based Arduino

Moderator: igrr

User avatar
By Mai Ehab
#72195 Hello ESP8266 Forum`s member :
i having a big project which need Arduino to take reads from sensors and a Wi-Fi to send these data to database
after having the code done in mega and in ESP8266 (the Wi-Fi module ) i don`t know how to make them communicating so ..
Is it possible to read data from Arduino Mega over serial then manipulating data sent via ESP`s code ?
And if it is posiiable can someone show me small examples please ?
Last edited by Mai Ehab on Thu Dec 07, 2017 4:59 am, edited 2 times in total.
User avatar
By majidmp97
#76219 hello
in 8266
for read serial and put it to string
Code: Select allString resive;

void setup() {

Serial.begin(115200);

}

void loop() {

while(Serial.available()) {

resive= Serial.readString();// read the incoming data as string

Serial.println(resive); // print data to serial esp8266 for test
}
}