mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tests/driver_io1_xplained: print light sensor values
This commit is contained in:
parent
734256aab6
commit
f872a7f676
@ -78,6 +78,13 @@ int main(void)
|
|||||||
xtimer_sleep(DELAY_1S);
|
xtimer_sleep(DELAY_1S);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint16_t light;
|
||||||
|
io1_xplained_read_light_level(&light);
|
||||||
|
printf("Light level: %i\n"
|
||||||
|
"+-------------------------------------+\n",
|
||||||
|
light);
|
||||||
|
xtimer_sleep(DELAY_1S);
|
||||||
|
|
||||||
/* set led */
|
/* set led */
|
||||||
gpio_set(IO1_LED_PIN);
|
gpio_set(IO1_LED_PIN);
|
||||||
xtimer_sleep(DELAY_1S);
|
xtimer_sleep(DELAY_1S);
|
||||||
|
Loading…
Reference in New Issue
Block a user