Step 1: Arduino
Arduino is an open-source prototyping platform based on easy-to-use hardware and software. Arduino boards are able to read inputs – light on a sensor, a finger on a button, or a Twitter message – and turn it into an output – activating a motor, turning on an LED, publishing something online.
Step 2: Materials
Now to begin we need to get ourselves some materials.
1: Arduino
2: Led diode
3:Power Source
Comes with the Arduino
4: Arduino IDE
https://www.arduino.cc/en/Main/Software
1st. We obviously need an Arduino board to carry out our little program.
2nd. Our Led to send signals to make it work.
3rd. Any power source that can power the Arduino and a way to send over our code to the Arduino, so basically a USB cable
4th. The environment we will be programming in which is the Arduino IDE. Download it from here
Step 3: Programing
After you install the Arduino IDE you will be shown a starter screen with two sections the setup section and the loop.
We will setup which pins we use in the setup and write the code we want to run in the loop
Lets setup digital pin 13 because its the closest to the ground pin.
Now in our loop we need to turn on the led so we write digitalWrite(13,HIGH).
We need to wait a second so we can see the led light up so we write delay(1000)
Lets turn the led off so then we write digitalWrite(13,LOW).
We have to wait a second again so we can see the effect delay(1000).
Since this code is in the loop section it will repeat forever or until we take out the power cable.
This code will make the led have a blink effect by turning it off and on continually.
Step 4: Uploading it
At the top left hand corner you will see an arrow button. This button is the upload button. It will send the code to your Arduino. When you click it you will be asked to save it. After the file has been saved it will begin uploading your code.
Step 5: Testing it
After the upload is complete you need to plug in the led into digital pin 13 and the ground pin. Press the reset button to make the code start and voila you have just created your first Arduino program. There is a video of my arduino running the code
Leave a Reply
You must be logged in to post a comment.