#include <FastLED.h>
CRGB LED[1];
int value=0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
FastLED.addLeds<NEOPIXEL,3>(LED,1);
}
void loop() {
// put your main code here, to run repeatedly:
value=analogRead(A0);
Serial.println(value);
if (value > 1000)
{
Serial.println("Red");
LED[0]=CRGB::Red;
FastLED.show();
}
else if (value > 500)
{
Serial.println("Orange");
LED[0]=CRGB(255, 106, 0);
FastLED.show();
}
else
{
Serial.println("Green");
LED[0]=CRGB::Green;
FastLED.show();
}
}