I need help with receiving a data packet from Arduino TX to ESP8266 RX hardwired.
I am using arduino IDE and arduino part is fine, i have few variables that i put in an array and sent is using the command "Serial.write(array)".
But for the esp8266 part, on receiving side, how do i receive this array?
Serial.read or Serial.readString() none of these are working...? I am getting a compilation error
Thanks in advance..
Here is my code
// Import required libraries
#include "ESP8266WiFi.h"
String msg[1000];
// WiFi parameters
const char* ssid = "lenovo";
const char* password = "password";
void setup(void)
{
// Start Serial
Serial.begin(9600);
// Connect to WiFi
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
// Print the IP address
Serial.println(WiFi.localIP());
}
void loop() {
Serial.println("I am in loop, now the data part");
msg = Serial.read();
Serial.println(msg);
}