Meike Froklage
/
ServoMotor
Code ServoMotor
Fork of Servo_HelloWorld by
main.cpp@2:e917f9bc829b, 2016-10-14 (annotated)
- 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?
User | Revision | Line number | New 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 |