This program uses the potentiometers to set the servo positions. Note that it will need additional power (6v) that can be supplied through the 1.3mm tip-positive DC conenctor

Dependencies:   Servo mbed

Committer:
chris
Date:
Mon Oct 15 12:43:06 2012 +0000
Revision:
0:d1fc4eddceab
First commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
chris 0:d1fc4eddceab 1 #include "mbed.h"
chris 0:d1fc4eddceab 2 #include "Servo.h"
chris 0:d1fc4eddceab 3
chris 0:d1fc4eddceab 4 Servo s1(p21);
chris 0:d1fc4eddceab 5 Servo s2(p22);
chris 0:d1fc4eddceab 6
chris 0:d1fc4eddceab 7 AnalogIn p1(p19);
chris 0:d1fc4eddceab 8 AnalogIn p2(p20);
chris 0:d1fc4eddceab 9
chris 0:d1fc4eddceab 10 int main() {
chris 0:d1fc4eddceab 11 while(1) {
chris 0:d1fc4eddceab 12 s1=p1;
chris 0:d1fc4eddceab 13 s2=p2;
chris 0:d1fc4eddceab 14 wait(0.1);
chris 0:d1fc4eddceab 15 }
chris 0:d1fc4eddceab 16 }