Facial Expressions using mbed ARM

04 Jul 2011

I am trying to reproduce facial expressions of a robot using the mbed kit. The face is driven by six servos.

I have a problem for testing the servos. I am using this code and one servo is connected to P21.

#include "mbed.h"

PwmOut servo_0(p21);

int main() {
        for(float p = 0.0f; p < 11.0f; p += 0.1f) {
            servo_0 = p;

The skeleton of the code was found in example programs. Thanks...

04 Jul 2011

You might like to try my library that's designed for RC type simple servos (pwm @ 20ms intervals). There's two example programs to show you how to get started. And the library supports six servos :)

Import librarySimpleRCservos

A simple API/Software interface to the LPC17xx PWM peripheral to provide control to up to six RC type servo controllers.

05 Jul 2011

Thanks for the reply... :)