Can I send data through the j1006 port and read it with python?
-
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 codeimport 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?
-
@José-Quintanilla What hardware are you using? voxl1 / voxl2 / flight core v1 / flight core v2, etc.
-
@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
-
@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?
-
@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
the success connection of the hardware
the setup