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