//attiny44a led 7 y btn 1 //attiny45 LED 4 y btn 3 #include int BTN=1;// set a name for the button int LED=7;//set a name fot the led int state=LOW;//set a new variable to store the actual state of the LED void setup () { pinMode(BTN,INPUT);//set the button as input pinMode(LED, OUTPUT);//set the led as output digitalWrite(LED,LOW);// set the output as low at the begining } void loop() { while(digitalRead(BTN)==LOW);//while the value keeps low //do this state=digitalRead(LED);//read the actual state of the output digitalWrite(LED,!state);//negate the actual state and use it to declare the write delay(100); while(digitalRead(BTN)==HIGH); }