help, how to drive LED band & neohex with m5stick



  • i've connect to a led band with grove connector(the default GPIO32 for m5stick). i tried following code but nothing happend...

    from m5stack import *
    import time
    from machine import Pin
    from neopixel import NeoPixel

    lcd.clear(lcd.WHITE)
    lcd.text(lcd.CENTER, lcd.CENTER, "I'm Phelix", lcd.BLACK)

    pin = Pin(32, Pin.OUT)
    np = NeoPixel(pin, 15)
    for i in range(15):
    np[i] = (255,255,255)
    np.write()

    can someone please help me?



  • Hello @pracio

    use RGB LED unit in UIFlow which result in this Python code:

    from m5stack import *
    from m5ui import *
    from uiflow import *
    import unit
    
    setScreenColor(0x111111)
    neopixel_1 = unit.get(unit.NEOPIXEL, unit.PORTA, 10)
    neopixel_1.setColor(1, 0xff0000)
    

    Thanks
    Felix



  • The Neohex has 37 RGB LEDS and the headband has 118 RGB LEDs.
    the range should be set to 155 as there are now 155 LEDs connected together.
    They should also be connected as below
    0_1655653766803_hex_cat.png

    However, this many LED's will cause power issues and you will need to build a power booster cable as shown in this guide.

    https://youtu.be/7MP_eG3U2So