User Tools

Site Tools


blinkcode

If you want to send us your comments, please do so. Thanks
More on comments


Arduino Blink code

/*
Blink
 
Turns a LED repeatedly on for delaytime time, then off for delaytime time.
*/
 
int delaytime = 10000;
 
// The setup function runs once when you power on the board or press the reset button
void setup() {
  // Iintialize the serial monitor
  Serial.begin(115200);
 
  // Initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
 
  // Write the Programname to the serial monitor.
  // In this way it can alway be known which program is in the micorcontroller
  Serial.println("Program name: Blink.sermon");    
}
 
// The loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // Turn the LED on (HIGH is the voltage level)
  Serial.println("LED: On");
  delay(delaytime);                  // Wait for delaytime time
  digitalWrite(LED_BUILTIN, LOW);    // Turn the LED off by making the voltage LOW
  Serial.println("LED: Off");
  delay(delaytime);                  // Wait for delaytime time
}

Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy

RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2024 Webevaluation.nl and the authors
Changes reserved.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
blinkcode.txt · Last modified: 28-11-2019 14:25 by 62.251.104.216