int verde=6; int rojo=5; int amarillo=3; const int pot1=0; const int pot2=1; const int pot3=2; int green; int red; int yellow;
void setup() { pinMode(verde, OUTPUT); pinMode(rojo, OUTPUT); pinMode(amarillo, OUTPUT); Serial.begin(9600); }
void loop() { green= analogRead(pot1)*(255.0/1023.0); analogWrite(verde,green); Serial.print(green); Serial.print(" ");
red= analogRead(pot2)*(255.0/1023.0); analogWrite(rojo,red); Serial.print(red); Serial.print(" ");
yellow= analogRead(pot3)*(255.0/1023.0); analogWrite(amarillo,yellow); Serial.println(yellow);
}