//Mauro Herrero - Fab Academy 2021 //CC-BY-SA //set constants, according to attiny pinout const int button = 3; const int blue = 4; //set variable - buttonstate int butState = 0; void setup() { // put your setup code here, to run once: pinMode(blue, OUTPUT); pinMode(button, INPUT); } void loop() { // put your main code here, to run repeatedly: butState = digitalRead(button); if (butState == HIGH){ digitalWrite(blue, HIGH); } else { digitalWrite(blue, LOW); } }