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.
detectorimpacto.hh@21:126249da7210, 2016-02-12 (annotated)
- Committer:
- joseortega
- Date:
- Fri Feb 12 14:37:20 2016 +0000
- Revision:
- 21:126249da7210
- Parent:
- 9:c217aed1ac8a
- Child:
- 22:29e613c92a2c
ejeX
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| joseortega | 8:5980909a65c0 | 1 | #ifndef detectorimpacto |
| joseortega | 8:5980909a65c0 | 2 | #define detectorimpacto |
| joseortega | 8:5980909a65c0 | 3 | |
| joseortega | 8:5980909a65c0 | 4 | #include " mbed.h" |
| joseortega | 21:126249da7210 | 5 | |
| joseortega | 21:126249da7210 | 6 | DigitalOut rojo(LED_RED); |
| joseortega | 21:126249da7210 | 7 | void detectorimpacto_choqueX(int dataX){ |
| joseortega | 21:126249da7210 | 8 | |
| joseortega | 21:126249da7210 | 9 | |
| joseortega | 21:126249da7210 | 10 | |
| joseortega | 21:126249da7210 | 11 | rojo=1; |
| joseortega | 21:126249da7210 | 12 | if(abs(dataX)>28000){ |
| joseortega | 21:126249da7210 | 13 | rojo=0; |
| joseortega | 21:126249da7210 | 14 | while(1) |
| joseortega | 21:126249da7210 | 15 | { |
| joseortega | 21:126249da7210 | 16 | |
| joseortega | 21:126249da7210 | 17 | rojo=!rojo; |
| joseortega | 21:126249da7210 | 18 | wait(.5); |
| joseortega | 21:126249da7210 | 19 | } |
| joseortega | 21:126249da7210 | 20 | |
| joseortega | 21:126249da7210 | 21 | |
| joseortega | 21:126249da7210 | 22 | |
| joseortega | 21:126249da7210 | 23 | |
| joseortega | 8:5980909a65c0 | 24 | |
| joseortega | 8:5980909a65c0 | 25 | |
| joseortega | 8:5980909a65c0 | 26 | } |
| joseortega | 8:5980909a65c0 | 27 | #endif |
