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.
main.cpp@1:40d2fd0b99e6, 2010-11-23 (annotated)
- Committer:
- simon
- Date:
- Tue Nov 23 16:10:35 2010 +0000
- Revision:
- 1:40d2fd0b99e6
- Parent:
- 0:ea7182628dfa
- Child:
- 2:7709000dbbc4
Hello World version including library
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| simon | 1:40d2fd0b99e6 | 1 | // Hello World to sweep a servo through its full range |
| simon | 1:40d2fd0b99e6 | 2 | |
| simon | 1:40d2fd0b99e6 | 3 | #include "mbed.h" |
| simon | 1:40d2fd0b99e6 | 4 | #include "Servo.h" |
| simon | 1:40d2fd0b99e6 | 5 | |
| simon | 1:40d2fd0b99e6 | 6 | Servo myservo(p21); |
| simon | 1:40d2fd0b99e6 | 7 | |
| simon | 1:40d2fd0b99e6 | 8 | int main() { |
| simon | 1:40d2fd0b99e6 | 9 | for(float p=0; p<1.0; p += 0.1) { |
| simon | 1:40d2fd0b99e6 | 10 | myservo = p; |
| simon | 1:40d2fd0b99e6 | 11 | wait(0.2); |
| simon | 1:40d2fd0b99e6 | 12 | } |
| simon | 1:40d2fd0b99e6 | 13 | } |