Thursday, January 16, 2014

2nd week 1.16.14 Light blinks slow and then goes faster

1st Programming:

Using "for" statement, made a LED light turn on from Arduino.
void setup() :{
    pinMode(LED,OUTPUT):   //Initialize Digital Pin 6 as an output
}
void loop() {
    digitalWrite(LED,HIGH);  // Set the LED On
    delayMicroseconds(16000);  //Wait for 16ms (1second)
    digitalWrite(LED,LOW);     //Set the LED Off
    delayMicroseconds(16000); // Wait for .016 seconds
}

Microcontrollers, input and output handout


 
 


No comments:

Post a Comment