access TX/RX on fipy + pytrack :



  • Hello,

    Could you please explain me how to access the TX/RX of the fipy/pytrack. I would like to retrieve the data from the GPS and the Accelerometer data using UART but I'm not quite sure to understand how to proceed on the board.

    I just use Sigfox and the GPS/Accelerometer , and by default I deactivated the wifi/bt pycom.wifi_on_boot(False).

    Thanks.



  • @testos Yes, you need to connect to the external IO header below the fipy. And you have to specify these Pins, when you open the UART, most likely UART1. On a Fipy, two of the three UARTs are already used by the firmware UART0 and maybe UART2. You have to try.



  • Hello @robert-hh,

    it's a bit related to my question last day in a different thread, I thought it could be better to create a dedicated one.

    You are right I could get the data from the USB but would like to send the data to pi zero. I do understand the "coding" part, what I don't understand is how should I do the wiring on the pytrack, I need to connect to the external IO header ?

    Thanks for your patience



  • @testos I do not understand you intention. If you use pytrack, the the UART/USB bridge will forward the communication over UART0 to the USB serial.
    If you want to use another UART for that, you have to open that, like:

    from machine import UART
    uart = UART(1, baudrate=19200, pins=('P9','P10'))
    

    Note that I reassigned the UART1 pins from their default assignment to P9 and P10 to avoid a conflict with the SD card.
    And then you can use uart.write() to send, uart.read() to receive, uart.any() to tell, whether there is data in the input buffer, etc....



Pycom on Twitter