The attached file demonstrates how to use Python to enable RS232 on the LTPP3(G2).
Before running the sample, please ensure the following two libraries are installed on your board.
Sudo pip3 install gpiod
Sudo pip3 install pyserial
To test the default values, please connect a Tibbit#01 in the S1 slot and connect to something that can output serial data at 115200, 8-N-1, with or without RTS/CTS flow control. The program will echo everything it receives from the serial port and print it in the command prompt.
You can run the file by:
Python3 ./hello_serial.py
Comments
0 comments
Please sign in to leave a comment.