Code ServoMotor

Dependencies:   Servo mbed

Fork of Servo_HelloWorld by Simon Ford

Committer:
meikefrok
Date:
Fri Oct 14 13:19:46 2016 +0000
Revision:
2:e917f9bc829b
Parent:
1:40d2fd0b99e6
Doesn't work;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
simon 1:40d2fd0b99e6 1
simon 1:40d2fd0b99e6 2 #include "mbed.h"
simon 1:40d2fd0b99e6 3 #include "Servo.h"
simon 1:40d2fd0b99e6 4
meikefrok 2:e917f9bc829b 5 Servo myservo(D8);
simon 1:40d2fd0b99e6 6
simon 1:40d2fd0b99e6 7 int main() {
meikefrok 2:e917f9bc829b 8 // for(float p=0; p<1.0; p += 0.1) {
meikefrok 2:e917f9bc829b 9 // myservo = p;
meikefrok 2:e917f9bc829b 10 // wait(0.2);
meikefrok 2:e917f9bc829b 11 myservo = 0.5;
simon 1:40d2fd0b99e6 12 }
meikefrok 2:e917f9bc829b 13