Gabriela Uribe – Assignment 2

Blinking LEDs:

This assignment was not posted to the blog on time, but I had done the assignment the weekend it was due.  Below is the Arduino code for it:

/*Blinking LED
* turns on and off a light emitting diod(LED)

int ledPin = 13;                    //LED connected to digital pin 13
void setup()
     pinMode(ledPin, OUTPUT);        //sets the digital pin as output

void loop()
   digitalWrite(ledPin, HIGH);        //sets the LED on
   delay(1000);                       //waits for a second
   digitalWrite(ledPin, LOW);         //sets the LED off
   delay(1000);                      //waits for a second


No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: