#include <FastLED.h>
#include <FastLED_NeoPixel.h>
#define DELAYVAL 100
#define NUM_LEDS 6
#define DATA_PIN 6
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
Serial.begin(115200);
pinMode(A1, INPUT);
}
void loop() {
int rpm = analogRead(A1);
rpm = map(rpm,0,1023,0,7);
Serial.println(rpm);
if (rpm == 1)
{leds[0] = CRGB::Chartreuse;
FastLED.show();
}
}