Assignment: Introduction to Arduino and Physical Computing
Collaborators:
Assignment: Introduction to Arduino and Physical Computing Collaborators:
Description:
Set up a simple circuit with a LED and downloaded code onto the Arduino board to make the LED blink at varying rates.
Components:
An LED, a breadboard, an Arduino board, a 220ohm resistor, connecting wires, and a laptop.
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(1000); // waits for a second digitalWrite(ledPin, LOW); // sets the LED off delay(1000); // waits for a second (changed this value to 100 for modified behavior)}