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.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)

    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
    neopixel_1 = unit.get(unit.NEOPIXEL, unit.PORTA, 10)
    neopixel_1.setColor(1, 0xff0000)


  • 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

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