I have a BeagleBoneBlack and would like to use it to control a servo for my robot. I'm mostly programming in ros and as such am looking preferably for a c++ solution. Is there an easy way of controlling a servo on a BBB running ubuntu 14.04 on the kernal 3.8? Most tutorials I have tried referred to files I did not have so I'm unsure.
1 Answer
It's python but easy to install: https://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/pwm. Otherwise you can fopen files in the device tree and write to them, or you can open /dev/mem and directly access the registers for the PWM drivers.
I strongly recommend using the first method it is far easier than the third and basically the same as the second just far more tested and probably well written.