1 of 1 people found this helpful
The first question is which Uart?
Whenever I have questions about which uart, I look at the thread: Using Serialx on Edison
If you are using the Arduino board and you are interested for example in the equivalent of Serial1 (pins 0, 1), than it is the device: /dev/ttyMFD1
In several of my Linux programs I prefer to abstract those away as for example which device I use to hook up an XBee. On some boards it can be an actual physical device like the ttyMFD1 and on other boards I may use an USB xbee and it may be ttyUSBx, so in those cases I often create a link like:
/dev/ttyXBEE and have my code use that.
Sometimes i use hard coded ones (as I have not figured out udev rules for those cases) like I have the following in my .profile file:
ln -s /dev/ttyMFD1 /dev/ttyXBEE
In other cases my preferred way is udev rules, where the system detects the hardware and creates the symbolic link for you...
If you are interested in what I have done in these cases, there is more up on my Raspberry Pi github project (KurtE)...
I have a Serial class that is built around Arduino code...
As for Pin numbers for MRAA_GPIO.. the pin number is not the internal processor board pin number, but instead the logical pin number. On Arduino board: this is in the range 0-19. For the Intel breakout board, this is in the range 0-55. More details in the MRAA docs: