projects
/
fw
/
openalt
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LCA 2008 Z-axis accelerometer demo
[fw/openalt]
/
sensors
/
sensors.c
diff --git
a/sensors/sensors.c
b/sensors/sensors.c
index 86fb39c8b2c00375592dceb047f4aa89111046c0..1f69a3647d3d82d11bb3143d54e39ff0441e7dfb 100644
(file)
--- a/
sensors/sensors.c
+++ b/
sensors/sensors.c
@@
-56,10
+56,14
@@
portTASK_FUNCTION (vSensorsTask, pvParameters __attribute__ ((unused)))
xTickCount = xTaskGetTickCount ();
xTickCount = xTaskGetTickCount ();
+ adcStartXYZ();
+
for (;;)
{
vTaskDelayUntil (&xTickCount, 100 / portTICK_RATE_MS);
for (;;)
{
vTaskDelayUntil (&xTickCount, 100 / portTICK_RATE_MS);
+ printf("tick\n");
+
//
// Adjust the DAC value so we output a slow sine wave
//
//
// Adjust the DAC value so we output a slow sine wave
//
@@
-90,5
+94,12
@@
portTASK_FUNCTION (vSensorsTask, pvParameters __attribute__ ((unused)))
xSemaphoreGive (semaphore);
}
xSemaphoreGive (semaphore);
}
+
+ //
+ // get and display last X, Y, and Z accelerometer readings,
+ // the start another conversion
+ //
+ printf("%04x %04x %04x\n", adcReadX(), adcReadY(), adcReadZ());
+
}
}
}
}