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.
Dependencies: mbed
main.cpp@0:ea5527eaa968, 2013-02-12 (annotated)
- Committer:
- mbed_official
- Date:
- Tue Feb 12 15:21:21 2013 +0000
- Revision:
- 0:ea5527eaa968
- Child:
- 2:aae9d053cb5d
AnalogIn Hello World
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mbed_official | 0:ea5527eaa968 | 1 | #include "mbed.h" |
| mbed_official | 0:ea5527eaa968 | 2 | |
| mbed_official | 0:ea5527eaa968 | 3 | AnalogIn ain(p19); |
| mbed_official | 0:ea5527eaa968 | 4 | DigitalOut led(LED1); |
| mbed_official | 0:ea5527eaa968 | 5 | |
| mbed_official | 0:ea5527eaa968 | 6 | int main() { |
| mbed_official | 0:ea5527eaa968 | 7 | while (1){ |
| mbed_official | 0:ea5527eaa968 | 8 | if(ain > 0.3) { |
| mbed_official | 0:ea5527eaa968 | 9 | led = 1; |
| mbed_official | 0:ea5527eaa968 | 10 | } else { |
| mbed_official | 0:ea5527eaa968 | 11 | led = 0; |
| mbed_official | 0:ea5527eaa968 | 12 | } |
| mbed_official | 0:ea5527eaa968 | 13 | } |
| mbed_official | 0:ea5527eaa968 | 14 | } |