get comms led running smoothly
This commit is contained in:
parent
f3a418af4c
commit
ac4d80f2d6
1 changed files with 2 additions and 7 deletions
9
node1.c
9
node1.c
|
|
@ -129,15 +129,10 @@ int main() {
|
||||||
pms5003_init(&pms_config, uart1, 20, 21, 18, 19);
|
pms5003_init(&pms_config, uart1, 20, 21, 18, 19);
|
||||||
|
|
||||||
struct repeating_timer timer_30;
|
struct repeating_timer timer_30;
|
||||||
// add_repeating_timer_ms(LOOP_INTERVAL_MS, cb_30, NULL, &timer_30);
|
add_repeating_timer_ms(LOOP_INTERVAL_MS, cb_30, NULL, &timer_30);
|
||||||
absolute_time_t blink_time = make_timeout_time_ms(5000);
|
|
||||||
comms_led_blink();
|
|
||||||
while (true) {
|
while (true) {
|
||||||
if(time_reached(blink_time)) {
|
|
||||||
comms_led_blink();
|
|
||||||
blink_time = make_timeout_time_ms(5000);
|
|
||||||
}
|
|
||||||
comms_led_update();
|
comms_led_update();
|
||||||
|
sleep_us(100);
|
||||||
tight_loop_contents();
|
tight_loop_contents();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue