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

ModalAI Forum

  1. ModalAI Support Forum
  2. Ask your questions right here!
  3. Communication through J18

Communication through J18

Scheduled Pinned Locked Moved Ask your questions right here!
23 Posts 5 Posters 6.1k Views 2 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.
  • Filip SlezakF Offline
    Filip SlezakF Offline
    Filip Slezak
    Contributor
    wrote on last edited by
    #1

    Hi, I'd like to communicate with a teensy from a Voxl2 through the serial channel on J18. Can you help me set this up?

    I tried UART first and then the I2C but I haven't figured this out. Here's my code

    import smbus
    
    # Open the I2C bus
    bus = smbus.SMBus(0)  # Use /dev/i2c-0
    
    # I2C device address
    address = 0x988000  # Replace with the actual I2C device address
    
    # Read lines of data from the I2C device
    while True:
        received_data = ""
        while True:
            byte = bus.read_byte(address)
            if byte == ord('\n'):  # Check for newline character
                break
            received_data += chr(byte)
    
        # Process the received data
        print("Received line:", received_data)
    
    # Close the I2C bus
    bus.close()
    

    and the one I want to use on the teensy

    #include <Wire.h>
    
    #define I2C_ADDRESS 0x42  // Replace with the I2C device address
    
    void setup() {
      Wire.begin(); // Initialize I2C communication
      Serial.begin(115200); // Set baud rate for serial monitor
    }
    
    void loop() {
      Wire.beginTransmission(I2C_ADDRESS);  // Begin transmission to the I2C device
      Wire.write("Hello, World!");  // Send the message
      Wire.endTransmission();  // End transmission
    
      Serial.println("Message sent!");
    
      delay(1000); // Wait for 1 second before sending the next message
    }
    

    This is my first attempt at dealing with I2C so extra comments are welcome as well. Would still be easier if I could use these pins for UART so tell me if that's an option.

    Thanks!

    Eric KatzfeyE 1 Reply Last reply
    0
    • Filip SlezakF Filip Slezak

      Hi, I'd like to communicate with a teensy from a Voxl2 through the serial channel on J18. Can you help me set this up?

      I tried UART first and then the I2C but I haven't figured this out. Here's my code

      import smbus
      
      # Open the I2C bus
      bus = smbus.SMBus(0)  # Use /dev/i2c-0
      
      # I2C device address
      address = 0x988000  # Replace with the actual I2C device address
      
      # Read lines of data from the I2C device
      while True:
          received_data = ""
          while True:
              byte = bus.read_byte(address)
              if byte == ord('\n'):  # Check for newline character
                  break
              received_data += chr(byte)
      
          # Process the received data
          print("Received line:", received_data)
      
      # Close the I2C bus
      bus.close()
      

      and the one I want to use on the teensy

      #include <Wire.h>
      
      #define I2C_ADDRESS 0x42  // Replace with the I2C device address
      
      void setup() {
        Wire.begin(); // Initialize I2C communication
        Serial.begin(115200); // Set baud rate for serial monitor
      }
      
      void loop() {
        Wire.beginTransmission(I2C_ADDRESS);  // Begin transmission to the I2C device
        Wire.write("Hello, World!");  // Send the message
        Wire.endTransmission();  // End transmission
      
        Serial.println("Message sent!");
      
        delay(1000); // Wait for 1 second before sending the next message
      }
      

      This is my first attempt at dealing with I2C so extra comments are welcome as well. Would still be easier if I could use these pins for UART so tell me if that's an option.

      Thanks!

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

      @Filip-Slezak J18 is a UART that is only available to the DSP so you cannot access it directly from the apps processor without a custom access library.

      Filip SlezakF 1 Reply Last reply
      0
      • Eric KatzfeyE Eric Katzfey

        @Filip-Slezak J18 is a UART that is only available to the DSP so you cannot access it directly from the apps processor without a custom access library.

        Filip SlezakF Offline
        Filip SlezakF Offline
        Filip Slezak
        Contributor
        wrote on last edited by
        #3

        @Eric-Katzfey Hi Eric, thanks for pointing this out. How would you go about establishing a serial communication with a Teensy or other microcontroller then?

        Eric KatzfeyE 1 Reply Last reply
        1
        • D Offline
          D Offline
          dougmiller
          wrote on last edited by
          #4

          I have the same question, but for the VOXL 2 Mini. How to access the HS-UART, and whether it can support oddball baud rates (1012kbps or something like that.)

          Eric KatzfeyE 1 Reply Last reply
          0
          • Filip SlezakF Filip Slezak

            @Eric-Katzfey Hi Eric, thanks for pointing this out. How would you go about establishing a serial communication with a Teensy or other microcontroller then?

            Eric KatzfeyE Online
            Eric KatzfeyE Online
            Eric Katzfey
            ModalAI Team
            wrote on last edited by
            #5

            @Filip-Slezak This add-on board will expose a UART that is accessible from the applications processor: https://www.modalai.com/collections/voxl-add-ons/products/m0125?variant=40740708876339

            Filip SlezakF 1 Reply Last reply
            0
            • D dougmiller

              I have the same question, but for the VOXL 2 Mini. How to access the HS-UART, and whether it can support oddball baud rates (1012kbps or something like that.)

              Eric KatzfeyE Online
              Eric KatzfeyE Online
              Eric Katzfey
              ModalAI Team
              wrote on last edited by
              #6

              @dougmiller Can you please open a new topic on the forum with this question? (I believe it may be possible to use J10)

              1 Reply Last reply
              0
              • Eric KatzfeyE Eric Katzfey

                @Filip-Slezak This add-on board will expose a UART that is accessible from the applications processor: https://www.modalai.com/collections/voxl-add-ons/products/m0125?variant=40740708876339

                Filip SlezakF Offline
                Filip SlezakF Offline
                Filip Slezak
                Contributor
                wrote on last edited by
                #7

                @Eric-Katzfey Hey, we already have this board on https://www.modalai.com/collections/expansion-board/products/m0078 - would that work?

                (and the PWM breakout board https://www.modalai.com/products/flight-core-pwm-output-cable-and-break-out-board)

                Eric KatzfeyE 1 Reply Last reply
                0
                • Filip SlezakF Filip Slezak

                  @Eric-Katzfey Hey, we already have this board on https://www.modalai.com/collections/expansion-board/products/m0078 - would that work?

                  (and the PWM breakout board https://www.modalai.com/products/flight-core-pwm-output-cable-and-break-out-board)

                  Eric KatzfeyE Online
                  Eric KatzfeyE Online
                  Eric Katzfey
                  ModalAI Team
                  wrote on last edited by
                  #8

                  @Filip-Slezak The VOXL2 mini does not have the expansion connectors to use the add on boards.

                  Filip Slezak 0F 1 Reply Last reply
                  0
                  • Eric KatzfeyE Eric Katzfey

                    @Filip-Slezak The VOXL2 mini does not have the expansion connectors to use the add on boards.

                    Filip Slezak 0F Offline
                    Filip Slezak 0F Offline
                    Filip Slezak 0
                    Contributor
                    wrote on last edited by
                    #9

                    @Eric-Katzfey Hey, I have to reply from another account because the email system for confirmation doesn't work (fyi)

                    We have the bigger standard Voxl2, not mini.

                    Eric KatzfeyE 1 Reply Last reply
                    0
                    • Filip Slezak 0F Filip Slezak 0

                      @Eric-Katzfey Hey, I have to reply from another account because the email system for confirmation doesn't work (fyi)

                      We have the bigger standard Voxl2, not mini.

                      Eric KatzfeyE Online
                      Eric KatzfeyE Online
                      Eric Katzfey
                      ModalAI Team
                      wrote on last edited by
                      #10

                      @Filip-Slezak-0 Oh, sorry, got confused by your VOXL2 mini question. That m0078 board only gives you USB, not a UART. And that other link goes to some PWM breakout board for flight core. Not sure how that one fits in with VOXL2 at all.

                      Filip Slezak 0F 1 Reply Last reply
                      0
                      • Eric KatzfeyE Eric Katzfey

                        @Filip-Slezak-0 Oh, sorry, got confused by your VOXL2 mini question. That m0078 board only gives you USB, not a UART. And that other link goes to some PWM breakout board for flight core. Not sure how that one fits in with VOXL2 at all.

                        Filip Slezak 0F Offline
                        Filip Slezak 0F Offline
                        Filip Slezak 0
                        Contributor
                        wrote on last edited by
                        #11

                        @Eric-Katzfey No worries, and yes that's it. How would you recommend I communicate with that external Teensy board? Can't seem to find easily accessible pins for that.

                        Eric KatzfeyE 1 Reply Last reply
                        0
                        • Filip Slezak 0F Filip Slezak 0

                          @Eric-Katzfey No worries, and yes that's it. How would you recommend I communicate with that external Teensy board? Can't seem to find easily accessible pins for that.

                          Eric KatzfeyE Online
                          Eric KatzfeyE Online
                          Eric Katzfey
                          ModalAI Team
                          wrote on last edited by
                          #12

                          @Filip-Slezak-0 I would go with that expansion board I pointed out and use UART.

                          Filip Slezak 0F 1 Reply Last reply
                          0
                          • Eric KatzfeyE Eric Katzfey

                            @Filip-Slezak-0 I would go with that expansion board I pointed out and use UART.

                            Filip Slezak 0F Offline
                            Filip Slezak 0F Offline
                            Filip Slezak 0
                            Contributor
                            wrote on last edited by
                            #13

                            @Eric-Katzfey Sorry for the late reply. Unfortunately, I don't see how that could work for us, we already have the m0078 on there and the J2 goes to the wifi dongle, what am I missing in what you're suggesting?

                            Eric KatzfeyE 1 Reply Last reply
                            0
                            • Filip Slezak 0F Filip Slezak 0

                              @Eric-Katzfey Sorry for the late reply. Unfortunately, I don't see how that could work for us, we already have the m0078 on there and the J2 goes to the wifi dongle, what am I missing in what you're suggesting?

                              Eric KatzfeyE Online
                              Eric KatzfeyE Online
                              Eric Katzfey
                              ModalAI Team
                              wrote on last edited by
                              #14

                              @Filip-Slezak-0 The board I am suggesting has USB and UART.

                              Filip Slezak 0F 1 Reply Last reply
                              0
                              • Eric KatzfeyE Eric Katzfey

                                @Filip-Slezak-0 The board I am suggesting has USB and UART.

                                Filip Slezak 0F Offline
                                Filip Slezak 0F Offline
                                Filip Slezak 0
                                Contributor
                                wrote on last edited by
                                #15

                                @Eric-Katzfey So you're thinking switch out the boards, use the UART for the wifi dongle and communicate over USB with the microcontroller?

                                Eric KatzfeyE 1 Reply Last reply
                                0
                                • Filip Slezak 0F Filip Slezak 0

                                  @Eric-Katzfey So you're thinking switch out the boards, use the UART for the wifi dongle and communicate over USB with the microcontroller?

                                  Eric KatzfeyE Online
                                  Eric KatzfeyE Online
                                  Eric Katzfey
                                  ModalAI Team
                                  wrote on last edited by
                                  #16

                                  @Filip-Slezak-0 No, keep using USB for the WiFi dongle and use the UART to communicate with the Teensy.

                                  Filip Slezak 0F 1 Reply Last reply
                                  0
                                  • Eric KatzfeyE Eric Katzfey

                                    @Filip-Slezak-0 No, keep using USB for the WiFi dongle and use the UART to communicate with the Teensy.

                                    Filip Slezak 0F Offline
                                    Filip Slezak 0F Offline
                                    Filip Slezak 0
                                    Contributor
                                    wrote on last edited by
                                    #17

                                    @Eric-Katzfey Got it, this is getting clearer. Is it safe to use the Teensy's 3.3V pins? According to this, the Voxl2 comm pins are at 1.8V even though its GPIOs are at 3.3V https://docs.modalai.com/voxl2-linux-user-guide/#devttyhs1---b2b-connector-uart

                                    Eric KatzfeyE 1 Reply Last reply
                                    0
                                    • Filip Slezak 0F Filip Slezak 0

                                      @Eric-Katzfey Got it, this is getting clearer. Is it safe to use the Teensy's 3.3V pins? According to this, the Voxl2 comm pins are at 1.8V even though its GPIOs are at 3.3V https://docs.modalai.com/voxl2-linux-user-guide/#devttyhs1---b2b-connector-uart

                                      Eric KatzfeyE Online
                                      Eric KatzfeyE Online
                                      Eric Katzfey
                                      ModalAI Team
                                      wrote on last edited by
                                      #18

                                      @Filip-Slezak-0 Yes, should be fine. We use that UART to connect with our external flight core boards that have 3.3V rx / tx.

                                      Filip Slezak 0F 1 Reply Last reply
                                      0
                                      • Eric KatzfeyE Eric Katzfey

                                        @Filip-Slezak-0 Yes, should be fine. We use that UART to connect with our external flight core boards that have 3.3V rx / tx.

                                        Filip Slezak 0F Offline
                                        Filip Slezak 0F Offline
                                        Filip Slezak 0
                                        Contributor
                                        wrote on last edited by
                                        #19

                                        @Eric-Katzfey Thanks Eric, got it working easily after that using a classic pyserial script. Great help!

                                        1 Reply Last reply
                                        0
                                        • Filip Slezak 0F Offline
                                          Filip Slezak 0F Offline
                                          Filip Slezak 0
                                          Contributor
                                          wrote on last edited by
                                          #20

                                          @Eric-Katzfey Hi again, can we expose another UART port for programming on the Voxl2?

                                          Filip Slezak 0F 1 Reply Last reply
                                          0

                                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                          With your input, this post could be even better 💗

                                          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