Connecting Teensy to VOXL 2
-
I purchased a Starling 2 Max drone, and want to connect a Teensy 4.1 to the UART7 port on the M0151 B2B expansion. I followed the instructions for VOXL 2 Connecting an External Flight Controller, to get pinouts and ran a pyserial script from the home directory of the VOXL to test sending messages for the Teensy to read. Debugging with pyserial indicates that I connect to /dev/ttyHS1, but I do not read anything from the Teensy.
#!/usr/bin/env python3 import sys import serial import time class SerialPort: def __init__(self, port='/dev/ttyHS1', baudrate=115200): try: self.ser = serial.Serial(port=port, baudrate=baudrate, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=1.0 ) print(f"Connected to {port} at {baudrate} baud") except serial.SerialException as e: print(f"Error opening serial port: {e}") sys.exit(1) def write(self, data): """Write data to serial port""" try: self.ser.write(data.encode()) self.ser.flush() except serial.SerialException as e: print(f"Error writing to serial port: {e}") def close(self): """Close serial port""" if self.ser.is_open: self.ser.close() def main(): # Initialize serial port ser = SerialPort() # Run TX/RX test (Send test messages) try: while True: # Send test message ser.write('Test\n') print("Sent: 'Test'.") # Wait before next test run time.sleep(1) except KeyboardInterrupt: print("\nClosing serial port...") finally: ser.close() if __name__ == '__main__': main()
What are possible next steps? Different changes to config files than documentation? Logic level shifter?
TL;DR: I want to connect a Teensy to VOXL2 via UART7 port using standard Linux practices.
Thanks!