Simple Neopixel Control with ATMegaZero ESP32-S2

Description: Colors of the RGB Neopixel on the ATMega Zero ESP32-S2 are cycled and displayed every second.

Simple Neopixel Control with ATMegaZero ESP32-S2

Notes: Search for and install the EasyNeoPixels Library from Arduino IDE’s Library Manager like in the image below:

EasyNeopixels Library

Supplies:

1 – ATMega Zero ESP32-S2   >> Link <<

Arduino Code:

#include <EasyNeoPixels.h>

void setup() {
  
    setupEasyNeoPixels(40, 1);  // GPIO Pin 40 controls the onboard Neopixel
    
}

void loop() {
    
    writeEasyNeoPixel(0, 10, 0, 0);    // red
    delay(1000);
    writeEasyNeoPixel(0, 0, 10, 0);    // green
    delay(1000);
    writeEasyNeoPixel(0, 0, 0, 10);    // blue
    delay(1000);
    writeEasyNeoPixel(0, 10, 10, 10);  // white
    delay(1000);
    writeEasyNeoPixel(0, 0, 0, 0);     // OFF
    delay(1000);
    
}

Leave a Comment

75 + = 77