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

    Neopixel connected to EXT.IO2 problem

    Modules
    2
    2
    178
    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.
    • M
      Marc SKIL
      last edited by

      Hello, my first post here. I am trying to use a Neopixel strand connected to an Ext.I/O2 module (connected to M5StickC2). I can see that I have a Neopixel option for port usage, but no way to write to them. This is a bit of code that let me just light the first pixel:

      import os, sys, io
      import M5
      from M5 import *
      from hardware import *
      from unit import EXTIO2Unit
      
      
      
      i2c0 = None
      extio2_0 = None
      rgb_0 = None
      
      
      def setup():
        global i2c0, extio2_0, rgb_0
      
        M5.begin()
        i2c0 = I2C(0, scl=Pin(33), sda=Pin(32), freq=100000)
        extio2_0 = EXTIO2Unit(i2c0)
        extio2_0.set_config_mode(0, 4)
      
      
      def loop():
        global i2c0, extio2_0, rgb_0
        M5.update()
        extio2_0.write_rgb_led(0, 0xff0a14)
      

      Any idea to for further ? Thanks,

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

        Hello @Marc-SKIL

        unit EXT.IO2 can only control one (1) RGB LED per output. So what you get is correct. Have a look at the protocol here.

        Thanks
        Felix

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

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