X-Git-Url: https://git.gag.com/?p=fw%2Fopenalt;a=blobdiff_plain;f=sensors%2Fsensors.c;h=1f69a3647d3d82d11bb3143d54e39ff0441e7dfb;hp=86fb39c8b2c00375592dceb047f4aa89111046c0;hb=429c02df13c3f0aeb8cbd6bd17e9e01ed3ab8e9f;hpb=221783226c8f457e094a04c5f4da9e2e3e7e8b42 diff --git a/sensors/sensors.c b/sensors/sensors.c index 86fb39c..1f69a36 100644 --- a/sensors/sensors.c +++ b/sensors/sensors.c @@ -56,10 +56,14 @@ portTASK_FUNCTION (vSensorsTask, pvParameters __attribute__ ((unused))) xTickCount = xTaskGetTickCount (); + adcStartXYZ(); + for (;;) { vTaskDelayUntil (&xTickCount, 100 / portTICK_RATE_MS); + printf("tick\n"); + // // Adjust the DAC value so we output a slow sine wave // @@ -90,5 +94,12 @@ portTASK_FUNCTION (vSensorsTask, pvParameters __attribute__ ((unused))) xSemaphoreGive (semaphore); } + + // + // get and display last X, Y, and Z accelerometer readings, + // the start another conversion + // + printf("%04x %04x %04x\n", adcReadX(), adcReadY(), adcReadZ()); + } }