Lab 02
Lab 02
Introduction To Arduino
What Is Arduino?
Arduino is an open source programmable circuit board that can be integrated into a
wide variety of makerspace projects both simple and complex. This board contains
a microcontroller which is able to be programmed to sense and control objects in the
physical world. By responding to sensors and inputs, the Arduino is able to interact
with a large array of outputs such as LEDs, motors and displays. Because of it’s
flexibility and low cost, Arduino has become a very popular choice for makers and
makerspaces looking to create interactive hardware projects.
Board Breakdown
Here are the components that make up an Arduino board and what each of their
functions are.
1. Reset Button – This will restart any code that is loaded to the Arduino board
2. AREF – Stands for “Analog Reference” and is used to set an external reference
voltage
3. Ground Pin – There are a few ground pins on the Arduino and they all work the
same
4. Digital Input/Output – Pins 0-13 can be used for digital input or output
5. PWM – The pins marked with the (~) symbol can simulate analog output
6. USB Connection – Used for powering up your Arduino and uploading sketches
7. TX/RX – Transmit and receive data indication LEDs
8. ATmega Microcontroller – This is the brains and is where the programs are
stored
9. Power LED Indicator – This LED lights up anytime the board is plugged in a
power source
10. Voltage Regulator – This controls the amount of voltage going into the Arduino
board
11. DC Power Barrel Jack – This is used for powering your Arduino with a power
supply
12. 3.3V Pin – This pin supplies 3.3 volts of power to your projects
13. 5V Pin – This pin supplies 5 volts of power to your projects
14. Ground Pins – There are a few ground pins on the Arduino and they all work the
same
15. Analog Pins – These pins can read the signal from an analog sensor and convert
it to digital
How To Program Arduino
Once the circuit has been created on the breadboard, you’ll need to upload the
program (known as a sketch) to the Arduino. The sketch is a set of instructions that
tells the board what functions it needs to perform. An Arduino board can only hold
and perform one sketch at a time. The software used to create Arduino sketches is
called the IDE which stands for Integrated Development Environment.
Download Software
Download the free software known as the IDE. The Arduino IDE is the interface
where you will write the sketches that tell the board what to do.You can find the latest
version of this software on the Arduino IDE download page.
To install the software, you will need to click on the link that corresponds with your
computer’s operating system
NOTE: LEDs are polarised, meaning that they have a certain way they need to be
connected if you are to not blow them. Connect the positive lead of the LED to the
resistor and run a wire from the ground lead to the GND pin on the Arduino. The
result should look like the schematic on this tutorial.
Complete Sketch
Required equipment: Microcontroller / two LEDs (blue) / two resistors with 100
Ohm / Breadboard / cables
Setup:
Task 3:Adding two Led’s
Task: Now you will add the code for the Blue LED by yourself
Task: After pushing the button an LED is supposed to light up for 5 seconds.
Required equipment:
Arduino / one LED (blue) / one resistor with 100 Ohm / one resistor with 1K Ohm
(1000 Ohm) / Breadboard / Cables / Push button
Schematic: