#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.print("Value: ");
Serial.println(value);
if(value > 1000){
Serial.println("RED");
leds[0] = CRGB::Red;
FastLED.show();
}
else if(value > 500){
Serial.println("Orange");
leds[0] = CRGB::Orange;
FastLED.show();
}
else {
Serial.println("GREEN");
leds[0] = CRGB::LimeGreen;
FastLED.show();
}
}