Question on battle bot program

hi, I am making a small scale battle bot after the show came on tv. I have an arduino mega with a seeed studio motor shield and a hc-06 bluetooth "chip". I programmed and wired everything but there is no output from the motor shield. I am a noob when it comes to programming so i would like your help. also I can connect my android phone to the blue tooth and the app I used worked before. The input in the app is 1,2,3,4 on a keyboard thanks, Will

Let me put on my magic hat and conjure up your code.

poof

There I have it.

As a starting point, please post your code.

Wait it do it post, sorry I will do that soon

Wait it do it post, sorry I will do that soon

*didn't

Still makes no sense.

If you don't have the code at hand to post, why bother replying?

#include “MotorDriver.h”

int Think = 2000; //Long delay time between steps

int Runtime = 5000; // How long Runtime actions will last

int Slow = 230; // slow speed (of 255 max)

int Fast = 255; // fast speed (of 255 max)
#include <SoftwareSerial.h>
SoftwareSerial BT(18, 19);
// creates a “virtual” serial port/UART
// connect BT module TX to D10
// connect BT module RX to D11
// connect BT Vcc to 5V, GND to GND
void setup()
{

motordriver.init();
motordriver.setSpeed(200,MOTORB);
motordriver.setSpeed(200,MOTORA);
pinMode(13, OUTPUT);
// set the data rate for the SoftwareSerial port
BT.begin(9600);
// Send test message to other device

}
char a; // stores incoming character from other device
void loop()
{

if (BT.available())
// if text arrived in from BT serial…
{
a=(BT.read());

if (a==‘1’)
{
motordriver.goForward();
delay(200);
motordriver.stop();
delay(100);
}
if (a==‘4’)
{
motordriver.goBackward();
delay(200);
motordriver.stop();
delay(100);
}
if (a==‘2’)
{
motordriver.goLeft();
delay(200);
motordriver.stop();
delay(100);
}
if (a==‘3’)
{

motordriver.goRight();
delay(200);
motordriver.stop();
delay(100);
}
}
}

PaulS:
Still makes no sense.

If you don’t have the code at hand to post, why bother replying?

I forgot to attach it in the original post (pretty big fail) so i just posted it now.

// Send test message to other device

}

Speaking of fail...

SoftwareSerial BT(18, 19);

There is no excuse for trying to do software serial on hardware serial pins.

Also, go back and edit your post and put the code inside "code" tags. Read the "how to post to the forum" to learn how to do that. The more effort you put in, the more effort we will put in to support you.

PaulS: ``` // Send test message to other device

}



Speaking of fail...



SoftwareSerial BT(18, 19); ```

There is no excuse for trying to do software serial on hardware serial pins.

i've done it before

i've done it before

Why? The HardwareSerial class does it better.