Hi,
Try Adafruit_NeoPixel.h library. Set pin to 15(GPIO) and number pixels to 10. Enjoy.
#include <Adafruit_NeoPixel.h>
#include <M5Stack.h>
#define PIN 15
#define NUMPIXELS 10
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB);
int delayval = 500;
void setup(){
M5.begin();
pixels.begin();
}
void loop() {
for(int i=0;i<NUMPIXELS;i++){
// pixels.Color takes RGB values, from 0,0,0 up to 255,255,255
pixels.setPixelColor(i, pixels.Color(0,0,150)); // Moderately bright BLUE color.
pixels.show(); // This sends the updated pixel color to the hardware.
delay(delayval); // Delay for a period of time (in milliseconds).
}
}