Programming Serial(UART) in C or C++
I am new to the Omega but not new to programming. I have looked through the Omega docs and through this forum but I am not able to find any documentation on what I need to program and setup the serial port in C or C++ - an example would really help. I m sure this must be somewhere, I just can seem to be able to find it.
Thanks in advance for your help.
@Arun-Kapur Using the UART on the Omega2 should be like using any other Linux UART device. For starters, use the program
opkg install python-pyserial) to use the device
/dev/ttyS1for UART1. For C code, search e.g. "linux C uart" or "linux C serial port" or see https://stackoverflow.com/questions/6947413/how-to-open-read-and-write-from-serial-port-in-c .
Documentation is present from the Onion team. That's the first Google result for "Omega2 UART". https://docs.onion.io/omega2-docs/uart1.html