#define RED_PIN 13
#define GREEN_PIN 12
#define BLUE_PIN 14
#define POT_PIN 34
void setup() {
pinMode(RED_PIN, OUTPUT);
pinMode(GREEN_PIN, OUTPUT);
pinMode(BLUE_PIN, OUTPUT);
pinMode(POT_PIN, INPUT);
}
void loop() {
int potValue = analogRead(POT_PIN);
int redValue = map(potValue, 0, 1365, 0, 255);
int greenValue = map(potValue, 1366, 2730, 0, 255);
int blueValue = map(potValue, 2731, 4095, 0, 255);
analogWrite(RED_PIN, redValue);
analogWrite(GREEN_PIN, greenValue);
analogWrite(BLUE_PIN, blueValue);
delay(10);
}