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
Diff: main.cpp
- Revision:
- 9:3708b94b2312
- Parent:
- 8:e7cafda76315
- Child:
- 11:27f2850b9388
diff -r e7cafda76315 -r 3708b94b2312 main.cpp
--- a/main.cpp Tue Feb 23 11:32:27 2016 +0000
+++ b/main.cpp Tue Mar 08 15:33:13 2016 +0000
@@ -4,17 +4,20 @@
*/
#include "mbed.h"
#include "Acelerometro.h"
+#include "AccelService.h"
Serial pc(p9, p11);
-int main(){
+int main() {
- Acelerometro acc;
+ Acelerometro acc;
+ AccelService acc_service;
- while(1){
+ 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);
}
