🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    help, how to drive LED band & neohex with m5stick

    Units
    neopixel led
    3
    3
    4.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pracio
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • felmueF
        felmue
        last edited by

        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

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 0
        • ajb2k3A
          ajb2k3
          last edited by

          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

          UIFlow, so easy an adult can learn it!
          If I don't know it, be patient!
          I've ether not learned it or am too drunk to remember it!
          Author of the WIP UIFlow Handbook!
          M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post