Hackerspace in Rotterdam, The Netherlands
© 2024. All rights reserved. Responsible Disclosure Privacy Statement
← back to the workshops
/* Blink Switching a LED on and off */ // integer variable led is declared int led = 2; // the setup() method is executed only once void setup() { // the led PIN is declared as digital output pinMode(led, OUTPUT); } // the loop() method is repeated void loop() { // switching on the led digitalWrite(led, HIGH); // stopping the program for 1000 milliseconds delay(1000); // switching off the led digitalWrite(led, LOW); // stopping the program for 1000 milliseconds delay(1000); }