Ko de Beer
Member
Hi
I'm working on a project that needs to send values from my esp8266 HUZZAH to my Teensy 3.6.
I got the communication working between the two but there is a slight problem.
The values get "cut".
I send 200 and 50
But the result on the monitor of the Teensy is:
205205205205205205
How can I fix this issue?
This is the code on the Teensy:
void setup() {
Serial1.begin(115200);
}
void loop() {
// Send bytes from Teensy to computer
if ( Serial1.available() ) {
Serial.write( Serial1.read() );
analogWrite (13, Serial1.read() );
}
}
This is the code on the Esp8266 HUZZAH
void setup() {
// Setup computer to Arduino serial
Serial.begin(115200);
// Setup Arduino to ESP8266 serial
// Use baud rate 115200 during firmware update
Serial1.begin(115200);
}
void loop() {
Serial.write ("200");
delay (1000);
Serial.write ("50");
delay (1000);
}
Thank you for reading! Please comment if you have any idea that could help
I'm working on a project that needs to send values from my esp8266 HUZZAH to my Teensy 3.6.
I got the communication working between the two but there is a slight problem.
The values get "cut".
I send 200 and 50
But the result on the monitor of the Teensy is:
205205205205205205
How can I fix this issue?
This is the code on the Teensy:
void setup() {
Serial1.begin(115200);
}
void loop() {
// Send bytes from Teensy to computer
if ( Serial1.available() ) {
Serial.write( Serial1.read() );
analogWrite (13, Serial1.read() );
}
}
This is the code on the Esp8266 HUZZAH
void setup() {
// Setup computer to Arduino serial
Serial.begin(115200);
// Setup Arduino to ESP8266 serial
// Use baud rate 115200 during firmware update
Serial1.begin(115200);
}
void loop() {
Serial.write ("200");
delay (1000);
Serial.write ("50");
delay (1000);
}
Thank you for reading! Please comment if you have any idea that could help
Last edited: