Description: Colors of the RGB Neopixel on the ATMega Zero ESP32-S2 are cycled and displayed every second.
Notes: Search for and install the EasyNeoPixels Library from Arduino IDE’s Library Manager like in the image below:
Supplies:
1 – ATMega Zero ESP32-S2
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); }