Académique Documents
Professionnel Documents
Culture Documents
Objectives:
a. Learn to use the Arduino Integrated Development Environment (IDE).
b. Write and download the programs to the Arduino UNO R3 boards.
c. Calibrate and test the continuous rotation servomotors.
2. Equipment List
Equipment
Arduino UNO R3 Board
BOE - Robotics Shield
Kit (for Arduino)
Piezo Buzzer
Quantity
01
Description
Mcu Atmel 328P
01
01
4. Circuit Diagram
5. Program code
/*
**file name: blink_long_long_short_short_short.ino
**author: Danien Lopes
**version: 1.2
**Description: this program make the led blinks according to a following pattern long : for 1 sec per 2 sec|short: for 0.5 sec per
1 sec.
*/
//variable declaration
int led = 13;
void setup()
{
pinMode(led, OUTPUT);// configure pin 13 as a output
}
//main code
void loop()
{
int i=0, k=0; //initialize variables
//loop to blink twice
for(i=0; i<2;i++){
blink_long(1000,2000);
}
//loop to blink 3 short times
for(k=0;k<3;k++){
blink_short(500,1000);
}
}
//setup function
void setup()
{
servo_left.attach(11);//attribute servo motor left to pin 11
servo_right.attach(12);// attribute servo motor right to pin 12
As a conclusion, I would like to mention that, despite a certain prior knowledge, all
new concepts and different approach given the MCU during lessons were observed
during the practices proposed in laborario.
I would also like to point out that the entire facility expected to make use of the
Arduino platform was easily perceived, since the Arduino was designed to facilitate
the use of microcontrollers for not experts in the area.