Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. General Questions
  3. Connecting Teensy to VOXL 2

Connecting Teensy to VOXL 2

Scheduled Pinned Locked Moved Unsolved General Questions
voxl2
3 Posts 2 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bkim1301
    wrote on last edited by bkim1301
    #1

    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!

    Eric KatzfeyE 1 Reply Last reply
    0
    • B bkim1301

      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!

      Eric KatzfeyE Offline
      Eric KatzfeyE Offline
      Eric Katzfey
      ModalAI Team
      wrote on last edited by
      #2

      @bkim1301 I would start by connecting the VOXL 2 UART 7 to a PC with a serial to USB cable. Make sure you can communicate back and forth using that setup and then do the same with the Teensy before connecting the Teensy and the VOXL 2 together. It's often very helpful to use an oscilloscope on the rx / tx lines to verify that there is actually data flowing.

      B 1 Reply Last reply
      0
      • Eric KatzfeyE Eric Katzfey

        @bkim1301 I would start by connecting the VOXL 2 UART 7 to a PC with a serial to USB cable. Make sure you can communicate back and forth using that setup and then do the same with the Teensy before connecting the Teensy and the VOXL 2 together. It's often very helpful to use an oscilloscope on the rx / tx lines to verify that there is actually data flowing.

        B Offline
        B Offline
        bkim1301
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        1

        Reading along? Create a free ModalAI Forum account to join in.

        With an account you can reply, ask your own question, get an email when a ModalAI engineer answers, and mark the reply that solved it. Your place in each thread is saved between visits.

        Questions about VOXL, Flight Core, ESCs and ModalAI drones are answered here by the engineers who build them.

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        ModalAI
        Categories Recent Tags ModalAI.com Docs
        © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups