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@0:0887fcb9e2eb, 2017-09-20 (annotated)
- Committer:
- Smashftw
- Date:
- Wed Sep 20 12:55:16 2017 +0000
- Revision:
- 0:0887fcb9e2eb
- Child:
- 1:31fe0557741c
?ving 4.2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Smashftw | 0:0887fcb9e2eb | 1 | #include "mbed.h" |
Smashftw | 0:0887fcb9e2eb | 2 | |
Smashftw | 0:0887fcb9e2eb | 3 | PwmOut myled(LED1); |
Smashftw | 0:0887fcb9e2eb | 4 | AnalogIn potmeter(p20); |
Smashftw | 0:0887fcb9e2eb | 5 | int main() |
Smashftw | 0:0887fcb9e2eb | 6 | { |
Smashftw | 0:0887fcb9e2eb | 7 | myled.period(0.02); |
Smashftw | 0:0887fcb9e2eb | 8 | while(1) { |
Smashftw | 0:0887fcb9e2eb | 9 | myled.write(potmeter); |
Smashftw | 0:0887fcb9e2eb | 10 | wait (0.1); |
Smashftw | 0:0887fcb9e2eb | 11 | } |
Smashftw | 0:0887fcb9e2eb | 12 | } |