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: BLE_API mbed nRF51822 circular_buffer
main.cpp@8:e7cafda76315, 2016-02-23 (annotated)
- Committer:
- agufal
- Date:
- Tue Feb 23 11:32:27 2016 +0000
- Revision:
- 8:e7cafda76315
- Parent:
- 7:e4f89c858e61
- Child:
- 9:3708b94b2312
Separada la lectura de los datos del acelerometro en una clase con una funcion leer, que devuelve un struct Vector con cada eje
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| agufal | 6:fa74a43cae81 | 1 | /* |
| agufal | 6:fa74a43cae81 | 2 | * Esto es para la placa Xtrinsic-Sense Board de element14, mas |
| agufal | 6:fa74a43cae81 | 3 | * concretamente para el acelerometro MMA8491Q |
| agufal | 6:fa74a43cae81 | 4 | */ |
| agufal | 0:c123bc196680 | 5 | #include "mbed.h" |
| agufal | 8:e7cafda76315 | 6 | #include "Acelerometro.h" |
| agufal | 0:c123bc196680 | 7 | |
| agufal | 0:c123bc196680 | 8 | Serial pc(p9, p11); |
| agufal | 4:a743917cd04c | 9 | |
| agufal | 0:c123bc196680 | 10 | int main(){ |
| agufal | 8:e7cafda76315 | 11 | |
| agufal | 8:e7cafda76315 | 12 | Acelerometro acc; |
| Alexisfdi | 3:80ceedd5ffac | 13 | |
| Alexisfdi | 3:80ceedd5ffac | 14 | while(1){ |
| Alexisfdi | 3:80ceedd5ffac | 15 | |
| agufal | 4:a743917cd04c | 16 | pc.printf("-----------------------------------------\n"); |
| agufal | 8:e7cafda76315 | 17 | Vector v = acc.leer(); |
| agufal | 8:e7cafda76315 | 18 | pc.printf(" X: %i\n Y: %i\n Z: %i\n", v.x, v.y, v.z); |
| agufal | 5:d5dba5370918 | 19 | |
| Alexisfdi | 3:80ceedd5ffac | 20 | } |
| agufal | 0:c123bc196680 | 21 | } |
