Browse Source

tests/driver_veml6070: cleanup

pr/rotary
Alexandre Abadie 5 years ago
parent
commit
ff5b0bf538
  1. 2
      tests/driver_veml6070/Readme.md
  2. 11
      tests/driver_veml6070/main.c

2
tests/driver_veml6070/Readme.md

@ -2,5 +2,5 @@
This is a test application for the VEML6070 UV sensor.
## Usage
The application initializes the VEML6070 sensor and displays the UV indice
The application initializes the VEML6070 sensor and displays the UV index
measure every 2 seconds.

11
tests/driver_veml6070/main.c

@ -26,8 +26,6 @@
#include "xtimer.h"
#include "board.h"
#define SLEEP_2S (2 * 1000 * 1000u) /* 2 seconds delay between printf */
int main(void)
{
veml6070_t dev;
@ -40,17 +38,18 @@ int main(void)
if (result == VEML6070_ERR_I2C) {
puts("[Error] The given i2c is not enabled");
return 1;
} else {
printf("Initialization successful\n\n");
}
puts("Initialization successful");
printf("\n+--------Starting Measurements--------+\n");
while (1) {
printf("UV indive: %d"
printf("UV index: %d"
"\n+-------------------------------------+\n",
veml6070_read_uv(&dev));
xtimer_usleep(SLEEP_2S);
/* 2s delay before next measure*/
xtimer_sleep(2);
}
return 0;

Loading…
Cancel
Save