Sunday, March 9, 2014

Arduino Project For Beginners

What is Arduino?
        Arduino is a programmable circuit board that is used in many electronics and DIY projects worldwide. The company that sells Arduino says this is what Arduino is: "An open-source electronics prototyping platform based on flexible easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments."

The Project
        This projects is sometimes called "blink." The object of the project is to make the built in LED of the Arduino to rapidly turn on and off. All you need for your project is your Arduino, a cord to connect the Arduino to the computer, and the Arduino software installed onto your PC.
Here Are the steps:
  1. Connect your Arduino to your computer and open the Arduino Software.
  2. Go to "Tools" and then "Serial Port." Select the port your Arduino is plugged into.
  3. Type this code into the Arduino Software.
void setup()
  pinMode(13, OUTPUT);

void loop ()
  digitalWrite(13, HIGH);
  digitalWrite(13, LOW);

   4.   Select "Save" and call the project "blink."
   5.   Select "Verify." If it comes up all clear, skip to step 6. If it does not work, check the code for any                  mistakes.
   6.   Once you get it verified, select "Upload." A light on the Arduino should start blinking every second.

What The Code Means
        The "void setup()" is telling the arduino that whatever is between the two curly brackets ( {} ), only   preform the task once. The "pinMode(13, OUTPUT);" tells the Arduino to give an electric signal to pin 13 on the Arduino board. Pin 13 is the pin on your Arduino with the built in LED. The "void loop ()" tells the Arduino to preform the task between the two curly brackets over and over again. The "digitalWrite(13, HIGH);" tells the Arduino to turn on pin 13. The "delay(1000);" tells The Arduino to wait for one second. The "digitalWrite(13, LOW);" tells the Arduino to turn off pin 13. Then the "delay(1000);" tells the Arduino to wait for another second.
        Have fun with this project!