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:d747e8c38639, 2013-09-14 (annotated)
- Committer:
- mmathias
- Date:
- Sat Sep 14 20:01:31 2013 +0000
- Revision:
- 0:d747e8c38639
nada
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mmathias | 0:d747e8c38639 | 1 | #include "mbed.h" |
| mmathias | 0:d747e8c38639 | 2 | |
| mmathias | 0:d747e8c38639 | 3 | DigitalOut myled(LED_RED); |
| mmathias | 0:d747e8c38639 | 4 | Timer M1; |
| mmathias | 0:d747e8c38639 | 5 | AnalogIn ain(PTC2); |
| mmathias | 0:d747e8c38639 | 6 | |
| mmathias | 0:d747e8c38639 | 7 | int main() { |
| mmathias | 0:d747e8c38639 | 8 | |
| mmathias | 0:d747e8c38639 | 9 | while(1) { |
| mmathias | 0:d747e8c38639 | 10 | M1.start(); |
| mmathias | 0:d747e8c38639 | 11 | myled = 1; |
| mmathias | 0:d747e8c38639 | 12 | printf("Entrada do AD:%f\n",ain.read()); |
| mmathias | 0:d747e8c38639 | 13 | myled = 0; |
| mmathias | 0:d747e8c38639 | 14 | M1.stop(); |
| mmathias | 0:d747e8c38639 | 15 | printf("O tempo gasto foi de %f segundos\n", M1.read()); |
| mmathias | 0:d747e8c38639 | 16 | } |
| mmathias | 0:d747e8c38639 | 17 | } |
