I. Materials Needed:
1. Prevent the male pins from touching each other, as well as the leads, on the bottom of the
board.
4. Another best practice is to unpower the board when adding or removing components or
connecting or disconnecting modules.
B. Setting Up
2. Connect the Arduino UNO to USB Cable Type B and the other end of the USB
connector connect it to a Computer System.
3. Open the Arduino IDE in the Computer System and make sure to check and
configure the board in the ‘Tools’ option.
5. Disconnect-reconnect the USB of the Arduino to find out which port to pick, or
use the Device Manager.
const int analogPin = A0; //the analog input pin attach to analog pin A0
const int ledPin = 9; //the led attach to pin 9
int inputValue = 0; //variable to store the value coming from sensor
int outputValue = 0; //variable to store the output value
void setup()
{
}
void loop()
{
inputValue = analogRead(analogPin); //read the value from the sensor
outputValue = map(inputValue,0,1023,0,255);
//Convert from 0-1023 proportional to the number of a number of from 0 to 255
2. Click “Upload” to check the code and subsequently upload the sketch to your board
3. If upload is successful, the message “Done Uploading” will appear in the status bar
ACTIVITY
1. Setup 6 LEDs and 6 Resistors on your breadboards. Connect the LEDs to your Arduino board. You
will learn in this activity how to light up a series of LEDs attached to pins 2 through 7 of the Arduino
board, with certain limitations (the pins have to be numbered contiguously, and the LEDs have to
be turned on in sequence). You will use Array and For Loop. Please see below setup. (Please refer to
lecture PowerPoint presentation for more guidance)
1. Based on this laboratory activity, add 2 more Light Emitting Diodes and 2 Resistors.
Create an Arduino prototype that will light the one LED at a time in sequence using a
potentiometer.
1. Jason C. Alcarez, MakerTek Robotics and Embedded Systems: (TechFactors, Inc. Philippines), 48