int leds=2;
int pulsador=1;
void setup() {
pinMode(pulsador, INPUT);
pinMode(leds, OUTPUT);
}
void loop()
{
if(digitalRead(pulsador)==HIGH)
digitalWrite(leds, HIGH);
else
digitalWrite(leds, LOW);
programacion
10