Professional Documents
Culture Documents
FAMILIARIZATION
activity 1
Note:
The arduino is a tool for building computers that can interact
with the physical world.
A microcontroller is a simple computer. It can do many things
and it does what is told to do so well.
THE ARDUINO UNO MICROCONTROLLER BOARD
System reset
Button Compatible Shields Pin Port
Power LED
USB port indicator
Programming/
Data transfer Debugging Port
LED indicator (ICSP)
DC Jack
External power
supply
U3
U2
U1
The Arduino IDE
The Arduino Integrated Development Environment - or just
Arduino IDE - contains a text editor for writing code, a
message area, a text console, a toolbar with buttons for
common functions and a series of menus. It connects to the
Arduino board via USB to upload programs and communicate
with it.
Upload New
Open
Verify Save
Note:
Technically, an Arduino Sketchbook is just a directory where you can store all of
your Arduino Sketches (hence the term sketchbook because it is a collection of
sketches). You use the Sketchbook to immediately access all of your recently
created sketches.
Sketch > Upload to upload your code to the Gizduino. You can also execute the
shortcut Ctrl + U.(Note: Executing the Upload command would cause the IDE to
recompile your code in case you have made any changes or have forgotten to
compile it beforehand.)
New starts a new file.
Open open an existing file
Save save the current file.
Verify the arduino compiles the code, it takes the code you have given and
translate it into something that the Arduino can understand. It also prints out
the error at the buttom of the Arduino IDE window.
Upload compiles and uploads the code to the Arduino UNO.
C. Testing the set-up
3. Connnect the USB cable to Arduino board and PC.
4. Check the setting of the board and the port if
properly connected.
Board: select Tools Boards (make sure you select
the board you you are using, Arduino UNO).
Port: select Tools Serial port (select the port you
are using).
Note:
Arduino, in general, uses C and C++ based functions for its commands. Arduino
4. Upload the Blink sketch sketches have the file extension .ino, and are compiled before being uploaded to the
board.
Select: File Examples 01 Basics Blink, to open a new
window with the Blink sketch.
5. Click Upload to compile the code in Arduino board.
In uploading, you will see at the buttom of the window Compiling
sketch and then Uploading. It will indicate Done uploading if the
sketch uploaded without any problems.
Note:
Check the LED near #13 if it is flashing on and off for one
second continously. If it so, then uploading is success.
Orange text help to troubleshoot.
Common problem: avrdude, communication between board
and computer. Unplug Arduino board from USB cable and
then plug.
Software developers use basic programs to test that their
computers is working as they would expected. These are
called Hello World programs.
Arduino board has built-in LED near #13 pin on the board use
to check that the Arduino board is working.
Arduino program s are often referred to as sketches.
Challenge activity
1. Turns the LED on 10 times than when it is off.