const int ledR=3, ledV=6, ledB=5, potR=A0, potV=A1, potB=A2;
void setup() {
pinMode(ledR, OUTPUT);
pinMode(ledV, OUTPUT);
pinMode(ledB, OUTPUT);
pinMode(potR, INPUT);
pinMode(potV, INPUT);
pinMode(potB, INPUT);
}
void loop() {
int valpot1 = analogRead(potR),
valpot2 = analogRead(potV),
valpot3 = analogRead(potB);
int valR= map (valpot1,0,1023,0,255);
int valV= map (valpot2,0,1023,0,255);
int valB= map (valpot3,0,1023,0,255);
analogWrite(ledR, valR);
analogWrite(ledV, valV);
analogWrite(ledB, valB);
}