Hi All,
I have a Teensy 4.0 and Teensy 3.6 to connect to a Raspberry Pi 3B+ (Running a fresh copy of Raspberry Pi OS) and use the python serial library to read the data.
I use the same sketch and code for the Teensy 3.6 and Teensy 4.0, the Teensy 4.0 works fine and reliably to read the serial data on the Raspberry Pi but the Teensy 3.6 won't print anything to the Raspberry Pi.
I have connected to a windows computer and the Teensy 3.6 and Teensy 4.0 both print correctly using the Teensy port and standard com port on the windows computer through the Arduino IDE.
I installed the Arduino IDE onto the Raspberry Pi and I get the serial messages for the Teensy 4.0 but not for the Teensy 3.6, making me think there is some kind of serial problem with the Teensy 3.6 to the Raspberry Pi.
I also tried a Arduino Uno and it works fine on the Raspberry Pi as well. The only issue I have is with the Teensy 3.6.
I did have the Teensy setup for "Dual Serial" and changed it back to "Serial". Could this have caused the issues with the Teensy communicating with the Raspberry Pi?
I need to use the Teensy 3.6 for the enhanced i2c_t3 library.
Teensy Code:
Python Code (Change between ttyACM0 and ttyACM1 to match result from dmesg | grep tty)
I have a Teensy 4.0 and Teensy 3.6 to connect to a Raspberry Pi 3B+ (Running a fresh copy of Raspberry Pi OS) and use the python serial library to read the data.
I use the same sketch and code for the Teensy 3.6 and Teensy 4.0, the Teensy 4.0 works fine and reliably to read the serial data on the Raspberry Pi but the Teensy 3.6 won't print anything to the Raspberry Pi.
I have connected to a windows computer and the Teensy 3.6 and Teensy 4.0 both print correctly using the Teensy port and standard com port on the windows computer through the Arduino IDE.
I installed the Arduino IDE onto the Raspberry Pi and I get the serial messages for the Teensy 4.0 but not for the Teensy 3.6, making me think there is some kind of serial problem with the Teensy 3.6 to the Raspberry Pi.
I also tried a Arduino Uno and it works fine on the Raspberry Pi as well. The only issue I have is with the Teensy 3.6.
I did have the Teensy setup for "Dual Serial" and changed it back to "Serial". Could this have caused the issues with the Teensy communicating with the Raspberry Pi?
I need to use the Teensy 3.6 for the enhanced i2c_t3 library.
Teensy Code:
Code:
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println("Hello from Teensy!");
delay(100);
Serial.println(1);
Serial.println(2);
Serial.println(3);
Serial.println(4);
delay(100);
}
Python Code (Change between ttyACM0 and ttyACM1 to match result from dmesg | grep tty)
Code:
import time
import serial
from serial.tools import list_ports
print("Script Started")
ser= serial.Serial('/dev/ttyACM0', 115200, timeout=1)
data=0
while True:
if ser.in_waiting >0:
data=ser.readline().decode('utf-8').rstrip()
print(data)