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

    M5Stack Faces II Led drive

    Arduino
    1
    1
    3.8k
    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.
    • C
      CHB
      last edited by

      Hello,
      I use the Adafruit_NeoPixel for drive the 10 Leds (2x5) in my Faces II base
      After the begin(), show() functions, all leds are off, but when I want to change a pixels and make a show() the first LED stay on event I put all pixels(index) to 0
      Any know this worry ?
      My code is this

      #include <Adafruit_NeoPixel.h>
      #define M5STACK_FIRE_NEO_NUM_LEDS 10
      #define M5STACK_FIRE_NEO_DATA_PIN 15
      Adafruit_NeoPixel pixels = Adafruit_NeoPixel(M5STACK_FIRE_NEO_NUM_LEDS, M5STACK_FIRE_NEO_DATA_PIN, NEO_GRB + NEO_KHZ800);
      vois setup() {
      pixels.begin();
      pixels.show();
      }

      void setPixels(int r, int g, int b) {
      for(int i=0; i<10; i++) pixels.setPixelColor(i, pixels.Color(r, g, b));
      pixels.show();
      }

      void loop() {
      setPixels(0, 100, 0);
      delay(500);
      setPixels(0, 100, 0);
      delay(500);
      setPixels(0, 100, 0);
      delay(500);

      }

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