You are on page 1of 8

2017

Proyect.
sumobot

Teachers name:Luis Ivan Contreras

Name team:Jose Guadalupe vargaz ,Maria Inez Mitzin, Alegandra ,Israel


Martinez Gonzalez.

SW11

proyecto sumobot.

UPSRJ
09/10/2017
 Materiales.

 Driver motor HG7881.

 Arduino Uno.

 Bluetooth HC05.

 Power bank /Celular 912R.

 Jumper wire.
 wire USB.

 Led.

 Resistenses 330 ohm.

 Dowland Bluetooth RC Controller.


Objetives

The objetives that we wait is learn more about the diferents coneccions and we can learn more
about programing in id arduino.

Sumobots name;

PAW PRINT BOT

The signifc of this names is because we area going to have a log about the animal of the school tha is
a coyote.

Code;

const int AIA = 9; // (pwm) pin 9 connected to pin A-IA

const int AIB = 5; // (pwm) pin 5 connected to pin A-IB

const int BIA = 10; // (pwm) pin 10 connected to pin B-IA

const int BIB = 6; // (pwm) pin 6 connected to pin B-IB

int lampudepan = 11;

int lampubelakang = 12;

byte speed = 255; // change this (0-255) to control the speed of the motors

char command;

void setup() {

Serial.begin(9600);

pinMode(AIA, OUTPUT); // set pins to output

pinMode(AIB, OUTPUT);

pinMode(BIA, OUTPUT);

pinMode(BIB, OUTPUT);

pinMode(lampudepan, OUTPUT);

pinMode(lampubelakang, OUTPUT);

}
void loop() {

if(Serial.available() > 0){

command = Serial.read();

Stop(); //initialize with motors stoped

//Change pin mode only if new command is different from previous.

//Serial.println(command);

switch(command){

case 'F':

Forward();

break;

case 'B':

Back();

break;

case 'L':

Left();

break;

case 'R':

Right();

break;

if(command=='W'){

digitalWrite(lampudepan,HIGH);

if (command=='w'){

digitalWrite(lampudepan,LOW);
}

if(command=='U'){

digitalWrite(lampubelakang,HIGH);

if (command=='u'){

digitalWrite(lampubelakang,LOW);

void Forward()

analogWrite(AIA, 0);

analogWrite(AIB, speed);

analogWrite(BIA, 0);

analogWrite(BIB, speed);

void Back()

analogWrite(AIA, speed);

analogWrite(AIB, 0);

analogWrite(BIA, speed);

analogWrite(BIB, 0);

void Left()

{
analogWrite(AIA, speed);

analogWrite(AIB, 0);

analogWrite(BIA, 0);

analogWrite(BIB, 0);

void Right()

analogWrite(AIA, 0);

analogWrite(AIB, 0);

analogWrite(BIA, speed);

analogWrite(BIB, 0);

void Stop()

analogWrite(AIA, 0);

analogWrite(AIB, 0);

analogWrite(BIA, 0);

analogWrite(BIB, 0);

}
.

Conclucion:

Whit this we can learn more about the circuits end conexions and we can use the diferents artefacts
for do the sumobot.

Thank you.

You might also like