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. Can I send data through the j1006 port and read it with python?

Can I send data through the j1006 port and read it with python?

Scheduled Pinned Locked Moved Ask your questions right here!
5 Posts 2 Posters 944 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.
  • José QuintanillaJ Offline
    José QuintanillaJ Offline
    José Quintanilla
    Regular
    wrote on last edited by
    #1

    I currently made a code to emulate a distance sensor, and I can read the usb port of my laptop to get the data of a nodemcu and a potentiometer, I want to try this inside the drone, so I can see if using a ultrasonic sensor is viable, I don't have the necessary cable at the moment to connect the nodemcu to the J10 port that has i2c and uart communication
    this is my code

    import serial
    ser = serial.Serial('/dev/ttyUSB0')
    print(ser.name)
    
    while True:
     line = ser.readline()
     decoded_data = line.decode('utf-8')
     print(decoded_data)
    

    Does anyone know if this would work?

    tomT 1 Reply Last reply
    0
    • José QuintanillaJ José Quintanilla

      I currently made a code to emulate a distance sensor, and I can read the usb port of my laptop to get the data of a nodemcu and a potentiometer, I want to try this inside the drone, so I can see if using a ultrasonic sensor is viable, I don't have the necessary cable at the moment to connect the nodemcu to the J10 port that has i2c and uart communication
      this is my code

      import serial
      ser = serial.Serial('/dev/ttyUSB0')
      print(ser.name)
      
      while True:
       line = ser.readline()
       decoded_data = line.decode('utf-8')
       print(decoded_data)
      

      Does anyone know if this would work?

      tomT Offline
      tomT Offline
      tom
      admin
      wrote on last edited by
      #2

      @José-Quintanilla What hardware are you using? voxl1 / voxl2 / flight core v1 / flight core v2, etc.

      José QuintanillaJ 1 Reply Last reply
      0
      • tomT tom

        @José-Quintanilla What hardware are you using? voxl1 / voxl2 / flight core v1 / flight core v2, etc.

        José QuintanillaJ Offline
        José QuintanillaJ Offline
        José Quintanilla
        Regular
        wrote on last edited by
        #3

        @tom the one included with m500 i think is the flight core v1, I'm currently using the expansion board that was included with the drone and I was able to detect the usb port, but know I need to install the serial library in the drone but I don't know how to install python libraries

        tomT 1 Reply Last reply
        0
        • José QuintanillaJ José Quintanilla

          @tom the one included with m500 i think is the flight core v1, I'm currently using the expansion board that was included with the drone and I was able to detect the usb port, but know I need to install the serial library in the drone but I don't know how to install python libraries

          tomT Offline
          tomT Offline
          tom
          admin
          wrote on last edited by
          #4

          @José-Quintanilla depending on how old your M500 is, it could have a FCv1 or a FCv2.

          Are you trying to plug your hardware into the flight core (STM) side or the voxl (apq8096) side of the drone?

          José QuintanillaJ 1 Reply Last reply
          0
          • tomT tom

            @José-Quintanilla depending on how old your M500 is, it could have a FCv1 or a FCv2.

            Are you trying to plug your hardware into the flight core (STM) side or the voxl (apq8096) side of the drone?

            José QuintanillaJ Offline
            José QuintanillaJ Offline
            José Quintanilla
            Regular
            wrote on last edited by
            #5

            @tom I was able to pug the hardware to the expansion board that goes to the j13 port of the voxl flight,

            lsusb the one im using is the Bus 001 Device 002: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter

            Screenshot from 2023-10-25 18-45-49.png

            the success connection of the hardware
            conection_succes.jpeg

            the setup

            setup.jpeg

            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

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