/* comment with multiple lines > Battle of the bytes > 23rd May 2025 > ISS Archimede > comment with multiple lines */ /* The following CODE is an example of binary counter with 1 digit (LED0): LED1 LED0 0 0 delay 1000mS 0 1 delay 1000mS -> we kindly ask you to write a code that generates a binary COUNTDOWN with 2 digits: LED1 LED0 1 1 delay 1000mS 1 0 delay 1000mS 0 1 delay 1000mS 0 0 delay 1000mS 1 1 delay 300mS 1 0 delay 300mS 0 1 delay 300mS 0 0 delay 300mS 1 1 delay 300mS blink LED1 & LED2 4 times 0 0 delay 300mS 1 1 delay 300mS 0 0 delay 300mS 1 1 delay 300mS 0 0 delay 300mS 1 1 delay 300mS 0 0 delay 300mS and so on ... you can check the CODE thanks to Arduino circuit */ // this line is comment // constants won't change. Used here to set a pin number: const int led0Pin = 2; // declares led0Pin integer and assign led0Pin = 2 (-> pin 2) - LSB, least significant bit -> LED0 const int led1Pin = 4; // declares led0Pin integer and assign led1Pin = 4 (-> pin 4) - MSB, most significant bit -> LED1 void setup() { // -> TO RUN ONCE, setup code <- define pin 2 and pin 4 as OUTPUT: pinMode(led0Pin, OUTPUT); // I/O PIN n.2 defined as OUTPUT pinMode(led1Pin, OUTPUT); // I/O PIN n.4 defined as OUTPUT } void loop() { // put your main code here, to run repeatedly: digitalWrite(led0Pin, HIGH); // turn ON led0 delay(1000); //delay 1000mS or 1 sec. digitalWrite(led0Pin, LOW); // turn OFF led0 delay(1000); }