-
You Reply: I there, I can not test exactly what you ask for but I will do as soon as possible.
By the way I send you a link with the robot working now, everything works well but both motors backward.
Turns are made by: M1->forward, M2->backward and M1->backward, M2->forward.
http://www.youtube.com/watch?v=OPlwGasZ07o&feature=player_embedded
EDIT: I have tested what you asked for, backward is still not working in any motors but when left/right turn is been made the motor turn forward/backward... Looks like driver does not like backward =( =(
-
You Reply: I there, I can not test exactly what you ask for but I will do as soon as possible.
By the way I send you a link with the robot working now, everything works well but both motors backward.
Turns are made by: M1->forward, M2->backward and M1->backward, M2->forward.
http://www.youtube.com/watch?v=OPlwGasZ07o&feature=player_embedded
EDIT: I have tested what you asked for, backward is still not working in any motors but when left/right turn is been made the motor turn forward/backward... Looks like driver does not like backward =( =(
-
You Reply: Hi, I have tested your code without success, goes only forward and when should be going backward stays stopped.
I changed pins because my PWM pins are from 13 to 2 but this does not matter.
About batteries, I am using a 2500mha fully charged and as I know them are really powerfull.
-
You Reply: Hi, I have tested your code without success, goes only forward and when should be going backward stays stopped.
I changed pins because my PWM pins are from 13 to 2 but this does not matter.
About batteries, I am using a 2500mha fully charged and as I know them are really powerfull.
-
You Reply: This is the code of motor control:
int E1 = 12; //M1 Speed Control PWM
int E2 = 11; //M2 Speed Control PWM
int M1 = 52; //M1 Direction Control
int M2 = 50; //M1 Direction Control
#define speed 250
void stop(void) //Stop
{
digitalWrite(E1,LOW);
digitalWrite(E2,LOW);
}
void advance(char a,char b) //Move forward
{
//turn_L (0,b);
//delay(20);
//turn_R (a,0);
digitalWrite(M1,HIGH);
digitalWrite(M2,HIGH);
analogWrite (E1,a);
analogWrite (E2,b);
}
void back_off (char a,char b) //Move backward
{
digitalWrite(M1,LOW);
digitalWrite(M2,LOW);
analogWrite (E1,a);
analogWrite (E2,b);
}
void turn_L (char a,char b) //Turn Left
{
digitalWrite(M1,LOW);
digitalWrite(M2,HIGH);
analogWrite (E1,a);
analogWrite (E2,b);
}
void turn_R (char a,char b) //Turn Right
{
digitalWrite(M1,HIGH);
digitalWrite(M2,LOW);
analogWrite (E1,a);
analogWrite (E2,b);
}
void setup(void)
{
pinMode(E1, OUTPUT);
pinMode(E2, OUTPUT);
pinMode(M1, OUTPUT);
pinMode(M2, OUTPUT);
Serial.begin(19200); //Set Baud Rate
}
void loop(void)
{
char val = Serial.read();
if(val!=-1)
{
switch(val)
{
case 'w':
back_off (speed,speed);
break;
case 's':
advance (speed,speed); //this is not working
break;
case 'd':
turn_L (speed,speed);
break;
case 'a':
turn_R (speed,speed);
break;
}
delay(40);
}
else stop();
}
About bee, I will try as soon as possible and will tell you something. But just one question, BT Rx and Tx should be connected to Tx and Rx in Arduino, isn't it?
-
You Reply: This is the code of motor control:
int E1 = 12; //M1 Speed Control PWM
int E2 = 11; //M2 Speed Control PWM
int M1 = 52; //M1 Direction Control
int M2 = 50; //M1 Direction Control
#define speed 250
void stop(void) //Stop
{
digitalWrite(E1,LOW);
digitalWrite(E2,LOW);
}
void advance(char a,char b) //Move forward
{
//turn_L (0,b);
//delay(20);
//turn_R (a,0);
digitalWrite(M1,HIGH);
digitalWrite(M2,HIGH);
analogWrite (E1,a);
analogWrite (E2,b);
}
void back_off (char a,char b) //Move backward
{
digitalWrite(M1,LOW);
digitalWrite(M2,LOW);
analogWrite (E1,a);
analogWrite (E2,b);
}
void turn_L (char a,char b) //Turn Left
{
digitalWrite(M1,LOW);
digitalWrite(M2,HIGH);
analogWrite (E1,a);
analogWrite (E2,b);
}
void turn_R (char a,char b) //Turn Right
{
digitalWrite(M1,HIGH);
digitalWrite(M2,LOW);
analogWrite (E1,a);
analogWrite (E2,b);
}
void setup(void)
{
pinMode(E1, OUTPUT);
pinMode(E2, OUTPUT);
pinMode(M1, OUTPUT);
pinMode(M2, OUTPUT);
Serial.begin(19200); //Set Baud Rate
}
void loop(void)
{
char val = Serial.read();
if(val!=-1)
{
switch(val)
{
case 'w':
back_off (speed,speed);
break;
case 's':
advance (speed,speed); //this is not working
break;
case 'd':
turn_L (speed,speed);
break;
case 'a':
turn_R (speed,speed);
break;
}
delay(40);
}
else stop();
}
About bee, I will try as soon as possible and will tell you something. But just one question, BT Rx and Tx should be connected to Tx and Rx in Arduino, isn't it?
-
You Reply: [list type=decimal]
[*]I am using Mega 2560
[*]Exactly, when I turn left/right one motor gones forward and the other one backward, when I go forward both motors work well but I want to go backward nothing happens.
[*]The H-Bridge is being supplied by 6xAA = 9V separated of Arduino, which is powered by USB, at the moment
[*]The main thing with the Bee is that there are many pins that we don't know where to connect, if we connect power one (3V3, 0V) we can see in the list of devices of Windows/Mobile Phone
[/list]
Thanks.
-
You Reply: [list type=decimal]
[*]I am using Mega 2560
[*]Exactly, when I turn left/right one motor gones forward and the other one backward, when I go forward both motors work well but I want to go backward nothing happens.
[*]The H-Bridge is being supplied by 6xAA = 9V separated of Arduino, which is powered by USB, at the moment
[*]The main thing with the Bee is that there are many pins that we don't know where to connect, if we connect power one (3V3, 0V) we can see in the list of devices of Windows/Mobile Phone
[/list]
Thanks.