Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
asd.cpp@1:9867060b8cea, 2018-08-13 (annotated)
- Committer:
- LordGT
- Date:
- Mon Aug 13 05:37:28 2018 +0000
- Revision:
- 1:9867060b8cea
fsefwef
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| LordGT | 1:9867060b8cea | 1 | #include "mbed.h" |
| LordGT | 1:9867060b8cea | 2 | #include "Servo.h" |
| LordGT | 1:9867060b8cea | 3 | |
| LordGT | 1:9867060b8cea | 4 | Servo myservo(p21); |
| LordGT | 1:9867060b8cea | 5 | |
| LordGT | 1:9867060b8cea | 6 | int main() { |
| LordGT | 1:9867060b8cea | 7 | while(1) { |
| LordGT | 1:9867060b8cea | 8 | for(int i=0; i<100; i++) { |
| LordGT | 1:9867060b8cea | 9 | myservo = i/100.0; |
| LordGT | 1:9867060b8cea | 10 | wait(0.01); |
| LordGT | 1:9867060b8cea | 11 | } |
| LordGT | 1:9867060b8cea | 12 | for(int i=100; i>0; i--) { |
| LordGT | 1:9867060b8cea | 13 | myservo = i/100.0; |
| LordGT | 1:9867060b8cea | 14 | wait(0.01); |
| LordGT | 1:9867060b8cea | 15 | } |
| LordGT | 1:9867060b8cea | 16 | } |
| LordGT | 1:9867060b8cea | 17 | } |