Beaglebone Black Serial c++
It seems to be a pain to get serial working in c++, adding to that, to do
it on the Beaglebone Black is hard, so I need someone with some expertise!
I created /dev/ttyO4 with the following command:
echo BB-UART4 > /sys/devices/bone_capemgr.9/slots
This gives me /dev/ttyO4. I then write a small program in cpp using a
library linked here. My code is found below:
#include <stdio.h>
#include "serialib.h"
#if defined (_WIN32) || defined( _WIN64)
#define DEVICE_PORT "COM1"
// COM1 for windows
No comments:
Post a Comment