Robot With Bluetooth Module
Robot With Bluetooth Module
Robot With Bluetooth Module
4. THEORETICAL FRAMEWORK
a. SERVO HS-311
The HS-311 is the perfect servo for inexpensive
applications. Do not let the price fool you though; this
servo features many of the same aspects of more
expensive servos. One piece circuit board and tight
mesh gears ensures great durability. Comes with a
number of various servo horns and arms with mounting
hardware.
1.
INTRODUCTION
2. OBJECTIVES
3. MATERIALS
.
This allows us, for example, connect two bluetooth
modules and form a point to point connection for
transmitting data between two microcontrollers or
devices.
c. ARDUINO MEGA
Decision making and control of the motors are
usually run by a microcontroller but in this case we use
Arduino. The control board contains the element, along
with other basic electronic components required to run
the microcontroller.
5. CONCLUSIONS AND
RECOMMENDATIONS
6.
REFERENCES
[1] http://www.microsonic.de/es/Interesting-facts.htm
[2]http://academica.unavarra.es/bitstream/handle/245
4/2503/577360.pdf?sequence=2
[3] http://www.geekfactory.mx/radio/bluetooth-hc-05y-hc-06-tutorial-de-configuracion/
7. ANNEXES
7.1 CODE
7.1.1
CODE
MODIFICATION
dato = Serial.read();
BLUETOOTH
/*ADELANTE A*/
if(dato == 'A')
{
adelante();
}
/*ATRAS B*/
else if (dato == 'B')
{
atras();
}
/*PARO E*/
else if ( dato== 'E')
{
paro();
led();
}
/*DERECHA D*/
if(dato == 'D')
{
derecha();
}
/*IZQUIERDA C*/
else if (dato == 'C')
{
izquierda();
}
}}
/*FUNCIONES */
void adelante()
{
servoder.write(180);
servoiz.write(73);
}
void atras()
{
servoder.write(0);
servoiz.write(180);
}
void paro()
{
servoder.write(90);
servoiz.write(90);
}
void led(){
digitalWrite(led1,HIGH);
digitalWrite(led2,HIGH);
delay (800);
digitalWrite(led1,LOW);
digitalWrite(led2,LOW);
delay (800);
}
void derecha()
{
delay(100);
servoder.write(90);
servoiz.write(70);
}
void izquierda()
{
servoder.write(110);
servoiz.write(90);
}
7.1.2 CODE
BLUETOOTH
TELEOPERATION
WITH
#include <Servo.h>
Servo servoder;
Servo servoiz;
char dato;
int led1=7;
int led2=6;
void setup()
{
Serial.begin(9600);
servoder.attach(10);
servoiz.attach(9);
pinMode(led1,OUTPUT);
pinMode(led2,OUTPUT);
}
void loop()
{
//preparando el Serial
if (Serial.available() >0) {
//Recebe os dados de x e y
7.2 IMAGES