You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#include <Arduino.h>
void setup() {
// Begin the Serial at 9600 Baud
Serial.begin(115200);
Serial1.begin(115200);
pinMode(13, OUTPUT);
}
void loop() {
// Serial.write(mystr,12); //Write the serial data
if (Serial1.available()) { // Receive
String readString = Serial1.readStringUntil('\n');
Serial.println(readString);
}
else { // Send
Serial1.print("Sent from Feather (millis) : ");
Serial1.println(millis());
}
digitalWrite(13, !digitalRead(13));
delay(1000);
}
Receiver (This a teensy 3.2)
#include <Arduino.h>
void setup() {
// Begin the Serial at 9600 Baud
Serial.begin(115200);
Serial1.begin(115200);
pinMode(13, OUTPUT);
// The teensy is too fast to boot, let's slow it a little
// to let enought time to Feather to boot too.
delay(5000);
}
void loop() {
// Serial.write(mystr,12); //Write the serial data
if (Serial1.available()) { // Receive
String readString = Serial1.readStringUntil('\n');
Serial.println(readString);
}
else { // Send
Serial1.print("Sent from Teensy (millis) : ");
Serial1.println(millis());
}
digitalWrite(13, !digitalRead(13));
delay(1000);
}