ESP32 Starter Kit
3. Wiring Diagram
4. Test Code
Before uploading the code, please ensure the library file is loaded to arduino IDE.
/*
keyestudio ESP32 Inventor Learning Kit
Project 5.1 Rainbow Ambient Light
http://www.keyestudio.com
*/
//Add 2812RGB library file
#include <NeoPixel_ESP32.h>
#define PIN 15
Adafruit_NeoPixel strip = Adafruit_NeoPixel(6, PIN); //Defines the instance strip and␣
˓→assigns the RGB LED number pins to the library code
void setup() {
strip.begin(); //Activate RGB LED
strip.show(); // Refresh the display
}
(continues on next page)
56 Chapter 8. Arduino Tutorial