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:80b80a5d16fa, 2014-08-30 (annotated)
- Committer:
- okano
- Date:
- Sat Aug 30 06:06:30 2014 +0000
- Revision:
- 1:80b80a5d16fa
- Parent:
- 0:28146a695ef4
test
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
okano | 0:28146a695ef4 | 1 | #include "mbed.h" |
okano | 0:28146a695ef4 | 2 | |
okano | 0:28146a695ef4 | 3 | DigitalOut myled(LED1); |
okano | 0:28146a695ef4 | 4 | AnalogIn ain( p20 ); |
okano | 0:28146a695ef4 | 5 | |
okano | 0:28146a695ef4 | 6 | int main() |
okano | 0:28146a695ef4 | 7 | { |
okano | 0:28146a695ef4 | 8 | while(1) { |
okano | 0:28146a695ef4 | 9 | if ( ain > 0.5 ) |
okano | 0:28146a695ef4 | 10 | myled = 1; |
okano | 0:28146a695ef4 | 11 | else |
okano | 0:28146a695ef4 | 12 | myled = 0; |
okano | 0:28146a695ef4 | 13 | |
okano | 0:28146a695ef4 | 14 | printf( "%f\r\n", (float)ain ); |
okano | 0:28146a695ef4 | 15 | } |
okano | 0:28146a695ef4 | 16 | |
okano | 0:28146a695ef4 | 17 | } |