Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
Hi all, Just a quick post to let you know I have published a new servo library. I am working on porting a complex project from my old Arduino to te mbed platform and I needed to be able to control a standard RC servo while still having PWM outputs for "Analog outputs" (LED dimming etc). I quickly wrote this library (called UniServ class) to control a servo without using the PWM hardware. It has the advantage that it can be used on any output pin, and it occured to me that others might find it useful, so I published it. At the moment it only has 2 member functions write_us() (the Hitech HS422 servos I use operate between 400 and 2600 microseconds, I have followed the mbed naming scheme) and read_us(), which is related to my project. If any one finds it useful and would like me to extend the API with more functions (to make it a more generic software PWM class or to add calibration functions), just let me know. To those of you who have noticed I have done something horrible in there, please let me know... I've been almost exclusively an Objective-C coder for the past few years and have forgotten most of my C++... :(