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@3:e36e651ab7f2, 2016-11-06 (annotated)
- Committer:
- MACRUM
- Date:
- Sun Nov 06 09:12:53 2016 +0000
- Revision:
- 3:e36e651ab7f2
- Parent:
- 2:aae9d053cb5d
Avoid implicitly converted warning. Update libraries.
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); |
| mbedAustin | 2:aae9d053cb5d | 5 | |
| mbedAustin | 2:aae9d053cb5d | 6 | // Turn on led if analog voltage > 30% of supply voltage |
| mbed_official | 0:ea5527eaa968 | 7 | int main() { |
| mbed_official | 0:ea5527eaa968 | 8 | while (1){ |
| MACRUM | 3:e36e651ab7f2 | 9 | if(ain > 0.3f) { |
| mbed_official | 0:ea5527eaa968 | 10 | led = 1; |
| mbed_official | 0:ea5527eaa968 | 11 | } else { |
| mbed_official | 0:ea5527eaa968 | 12 | led = 0; |
| mbed_official | 0:ea5527eaa968 | 13 | } |
| mbed_official | 0:ea5527eaa968 | 14 | } |
| mbed_official | 0:ea5527eaa968 | 15 | } |