This worked for me -- note the use of: esp8266_pinToGpio[NEOPIXEL_PIN]
#include <Adafruit_NeoPixel.h>
#define NEOPIXEL_PIN 6
// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 8
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, esp8266_pinToGpio[NEOPIXEL_PIN], NEO_GRB + NEO_KHZ800);
void setup() {
pinMode(NEOPIXEL_PIN, OUTPUT);
digitalWrite(NEOPIXEL_PIN, LOW);
//set up neopixel
pixels.begin();
}
void loop() {
delay(1000);
// For a set of NeoPixels the first NeoPixel is 0, second is 1, all the way up to the count of pixels minus one.
for(int i=0;i<NUMPIXELS;i++){
// pixels.Color takes RGB values, from 0,0,0 up to 255,255,255
pixels.setPixelColor(i, 0, 255, 0); // Moderately bright green color.
pixels.setBrightness(50);
}
pixels.show(); // This sends the updated pixel color to the hardware.
}