I’m using a Colobri imx8x with an Viola Carrier Board V1.1. I’ve trying to read data from a distance sensor (TF mini plus) using serial communication (Uart-C) and a python aplicattion. However, even with the correct bauld rate, the incoming data is empty. Even so, if I remove the sensor’s Tx wire from the UARTC-Rx pin and put it again, the aplication reads the distance corectly. It seems that the comunication only works if I continuously remove and put the Tx wire in the UARTC-Rx pin.
Hi @Uiseman ,
Welcome to the Toradex Community!
What OS version are you using? Can you please share with us the python application you are executing? If you have not tested it yet, can you please try the python examples available here and see if the scenario is the same?
The OS version is 5.7.0-devel-20220708170631+build.0 (dunfell). You can see the python code right bellow:
The’re few differences between the code we’re using and the exaple provided. The parameters seted in the Serial object are used to match with the communication settings of the sensor. If we use a jumper between the uart TX and RX pin, and make a thread to simulate the sensor writing, the aplication works. The problem is when the sensor is conected to the viola. Nonetheless, we’ve already tested the sensor, and it’s seems to works fine. Indeed, there’s one colibri that can read correctly the data from the sensor, using the exaclty same aplication that i showed.That’s why we think that the problem it’s some kind of configuration of the UARTC .
Hi @Uiseman ,
The code you sent us should work fine.
Do you have other modules/sensors that you can test, please?