Learning how to use Arduino

Our course recently ordered some new hardware for us to learn  and play around with. One of these is the Arduino, an open source platform used for prototyping electronics.

The only experince I have had with electronics is during high school physics lessons and they were mainly simple circuits, so I thought it would be useful to learn a bit more about this for future projects. To begin learning how to use the Arduino I followed a tutorial on making an LED light first blink, then blink faster when a button is pressed.

Here is the code I used:


The arduino uses inputs and output ports. This code sets the LED to an output and the button as an input. A loop cycle is created where power is sent to the LED, the loop is delayed for a period of time (leaving the light on), then no power is sent to the LED (turning the light off). If the button is pressed the time of the delay is shorter, making the blinking faster.

Here is a video.

I then tried out my own extention of this code. It’s very simple but it helped me to understand and cement the basics, especially of the concepts of ports, in my mind. This time the LED I attached to the breadboard lights up when the button is pressed and turns off when it is not pressed.

Here’s the code:


And here’s the video:

Here’s a link to the website of the Arduino Project.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s