default.txt 693 B

123456789101112131415161718192021222324
  1. /*
  2. Blink
  3. Turns on an LED on for one second, then off for one second, repeatedly.
  4. This example code is in the public domain.
  5. */
  6. // Pin 13 has an LED connected on most Arduino boards.
  7. // give it a name:
  8. int led = 13;
  9. // the setup routine runs once when you press reset:
  10. void setup() {
  11. // initialize the digital pin as an output.
  12. pinMode(led, OUTPUT);
  13. }
  14. // the loop routine runs over and over again forever:
  15. void loop() {
  16. digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
  17. delay(1000); // wait for a second
  18. digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
  19. delay(1000); // wait for a second
  20. }