test_led_strip/src/sample_hello_world.cpp

19 lines
488 B
C++

#include <zephyr/drivers/led.h>
#include <zephyr/kernel.h>
led_dt_spec status = LED_DT_SPEC_GET(DT_NODELABEL(status_led));
auto main() -> int {
printk("hello world %s\n", CONFIG_BOARD);
printk("hello world %s\n", CONFIG_BOARD);
printk("hello world %s\n", CONFIG_BOARD);
printk("hello world %s\n", CONFIG_BOARD);
while (true) {
printk("hello world\n");
led_on_dt(&status);
k_sleep(K_MSEC(1000));
led_off_dt(&status);
k_sleep(K_MSEC(1000));
}
return 0;
}