AdmiralCrunch
Well-known member
Hi
I once got had the communication from Teensy to Raspi working, but since a few days I got back to work on it and it just does not work whatever I try..
So I went now to test it between Teensy 3.2 and Teensy 3.6.
I connected the T3.2 RX0 -> T3.6 TX0
and the T3.2 TX0 -> T3.6 RX0
code for the T3.2 (sending)
on the T3.6 side I simply want the LED blink when something is recieved:
the T3.6 is blinking but nothing on the T3.6 .. why is that? what am I doing wrong?
I once got had the communication from Teensy to Raspi working, but since a few days I got back to work on it and it just does not work whatever I try..
So I went now to test it between Teensy 3.2 and Teensy 3.6.
I connected the T3.2 RX0 -> T3.6 TX0
and the T3.2 TX0 -> T3.6 RX0
code for the T3.2 (sending)
Code:
const int ledPin = 13;
void setup() {
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
Serial1.begin(9600);
}
void loop() {
Serial.write("hhh");
Serial1.write("fff");
digitalWrite(ledPin, HIGH);
delay(500);
digitalWrite(ledPin, LOW);
delay(500);
}
on the T3.6 side I simply want the LED blink when something is recieved:
Code:
const int ledPin = 13;
void setup() {
pinMode(ledPin, OUTPUT);
Serial1.begin(9600);
}
void loop() {
int incomingByte;
if (Serial1.available() > 0) {
incomingByte = Serial.read();
if(incomingByte != -1) {
digitalWrite(ledPin, HIGH);
delay(500);
digitalWrite(ledPin, LOW);
delay(500);
}
}
}
the T3.6 is blinking but nothing on the T3.6 .. why is that? what am I doing wrong?