/*
Sending data from Arduino to ESP8266
ESP8266 parts
*/
void setup() {
// Open serial communications and wait for port to open
Serial.begin(115200);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
}
void loop() { // run over and over
if (Serial.available()) {
int inByte = Serial.read();
Serial1.write(inByte);
}
}
|