int ROJO = 10;
int VERDE = 9;
int AZUL = 8;
int POT1 = A0;
int POT2 = A1;
int POT3 = A2;
int POTVAL1 = 0;
int BRILLOPOT1=0;
int POTVAL2 = 0;
int BRILLOPOT2=0;
int POTVAL3 = 0;
int BRILLOPOT3=0;
void setup() {
// put your setup code here, to run once:
pinMode(POT1, INPUT);
pinMode(POT2, INPUT);
pinMode(POT3, INPUT);
pinMode(ROJO, OUTPUT);
pinMode(VERDE, OUTPUT);
pinMode(AZUL, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
POTVAL1 = analogRead(POT1);
BRILLOPOT1 = map(POTVAL1,0,1023,0,255);
POTVAL2 = analogRead(POT2);
BRILLOPOT2 = map(POTVAL2,0,1023,0,255);
POTVAL3 = analogRead(POT3);
BRILLOPOT3 = map(POTVAL3,0,1023,0,255);
analogWrite(ROJO,BRILLOPOT1);
analogWrite(VERDE,BRILLOPOT2);
analogWrite(AZUL,BRILLOPOT3);
}