void lumen_leds_show() { nrf_delay_us(250); neopixel_show(&ray1); neopixel_show(&ray2); neopixel_show(&ray3); neopixel_show(&ray4); }
void neopixel_clear(neopixel_strip_t *strip) { for (int i = 0; i < strip->num_leds; i++) { strip->leds[i].simple.g = 0; strip->leds[i].simple.r = 0; strip->leds[i].simple.b = 0; } neopixel_show(strip); }
uint8_t neopixel_set_color_and_show(neopixel_strip_t *strip, uint16_t index, uint8_t red, uint8_t green, uint8_t blue) { if (index < strip->num_leds) { strip->leds[index].simple.r = red; strip->leds[index].simple.g = green; strip->leds[index].simple.b = blue; neopixel_show(strip); } else return 1; return 0; }
STATIC mp_obj_t neopixel_show_(mp_obj_t self_in) { neopixel_obj_t *self = (neopixel_obj_t*)self_in; neopixel_show(&self->strip); return mp_const_none; }