Assignment: Introduction to Arduino and Physical Computing
Collaborators:
Assignment: Introduction to Arduino and Physical Computing
Description
Created a circuit consisting of an LED and a resistor and ran code to make the LED blink faster than the default of 1 second. The LED was connected to pin 13.
Components Used
Arduino Code
/*
* Blink
*/
int ledPin = 13; // LED connected to digital pin 13
void setup() // run once, when the sketch starts
{
pinMode(ledPin, OUTPUT); // sets the digital pin as output
}
void loop() // run over and over again
{
digitalWrite(ledPin, HIGH); // sets the LED on
delay(300); // waits for approximately 1/3 of a second
digitalWrite(ledPin, LOW); // sets the LED off
delay(300); // waits for approximately 1/3 of a second
}
Item