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
- Committer:
- agufal
- Date:
- 2016-03-08
- Revision:
- 9:3708b94b2312
- Parent:
- 8:e7cafda76315
- Child:
- 11:27f2850b9388
File content as of revision 9:3708b94b2312:
/*
* Esto es para la placa Xtrinsic-Sense Board de element14, mas
* concretamente para el acelerometro MMA8491Q
*/
#include "mbed.h"
#include "Acelerometro.h"
#include "AccelService.h"
Serial pc(p9, p11);
int main() {
Acelerometro acc;
AccelService acc_service;
while(1) {
pc.printf("-----------------------------------------\n");
Vector v = acc.leer();
acc_service.updateAccelState(v);
pc.printf(" X: %i\n Y: %i\n Z: %i\n", v.x, v.y, v.z);
}
}
