GodsVictor1
Published © GPL3+

Simple Blinking LED

This project is a simple tutorial for beginners.

BeginnerShowcase (no instructions)4,087
Simple Blinking LED

Things used in this project

Story

Read more

Schematics

schematics

Code

Untitled file

C#
//Blinking_LED
//turn on the LED for half a second,then off for half a second,repeatedly
//support@sunfounder.com
//www.sunfounder.com
//2015.5.7
/************************************************/
const int ledPin = 9;//the number of the LED pin
/************************************************/
void setup()
{
  pinMode(ledPin,OUTPUT);//initialize the digital pin as an output
}
/************************************************/
//the loop routine runs over and over again forever
void loop()
{
  digitalWrite(ledPin,HIGH);//turn the LED on 
  delay(500);               //wait for half a second
  digitalWrite(ledPin,LOW); //turn the LED off
  delay(500);               //wait for half a second
}

Credits

GodsVictor1
0 projects • 0 followers

Comments