Sabertooth 60x2

Just got this and have run the RC mode test, all good. Want to use a hc06 bt module along with the ardumotive android app. At the moment I am trying to cut and paste different bits of code together. some months ago I found a good source of info on this but cant find it now.

If youve seen a good tutorial etc on this please send a link

this is the code so far, heaps of errors
the original code read
int power;
I changed this to int powerA; and int powerB; so I could have different value for each motor. Is “power” a command in the servo.h library? Will powerA and powerB be okay as names and behave as "Int"s

//TrailerTug
//Calculate Battery Level
const float maxBattery = 12.7;// Change value to your max battery voltage level!
int perVolt; // Percentage variable
float voltage = 0.0; // Read battery voltage
int level;
// Use it to make a delay… without delay() function!
long previousMillis = -100010;// -100010=-10sec. to read the first value. If you use 0 then you will take the first value after 10sec.
long interval = 100010; // interval at which to read battery voltage, change it if you want! (101000=10sec)
unsigned long currentMillis; //unsigned long currentMillis;

//Useful Variables
int i=0;
int j=0;
int state;
int vSpee
d=255; // Default speed, from 0 to 255

#include <Servo.h>

Servo ST1, ST2;

void setup()
{
ST1.attach( 9, 1000, 2000);
ST2.attach(10, 1000, 2000);
Serial.begin(9600);
}

void loop()
{
//Stop car when connection lost or bluetooth disconnected
if(digitalRead==LOW) { state=‘S’; }

//Save income data to variable ‘state’
if(Serial.available() > 0)
{state = Serial.read();
}

/Battery******/
//Read battery voltage every 10sec.
currentMillis = millis();
if(currentMillis - (previousMillis) > (interval))
{
previousMillis = currentMillis;
//Read voltage from analog pin A0 and make calibration:
voltage = (analogRead(A0)*5.015 / 1024.0)11.132;
//Calculate percentage…
perVolt = (voltage
100)/ maxBattery;
if (perVolt<=75) { level=0; }
else if (perVolt>75 && perVolt<=80) { level=1; } // Battery level
else if (perVolt>80 && perVolt<=85) { level=2; } //Min ------------------------ Max
else if (perVolt>85 && perVolt<=90) { level=3; } // | 0 | 1 | 2 | 3 | 4 | 5 | >
else if (perVolt>90 && perVolt<=95) { level=4; } // ------------------------
else if (perVolt>95) { level=5; }
Serial.println(level);
}

}

int powerA;
int powerB;

//If state is equal with letter ‘F’, TUG will go forward
{if (state == ‘F’)
{
for (powerA = 0; powerA <= 180; powerA ++)
for (powerB = 0; powerB <= 180; powerB ++)
{
ST1.write(powerA);
ST2.write(powerB);
delay(20);
}
}
/Backward*****/
//If state is equal with letter ‘B’, TUG will go backward
else if (state == ‘B’)

// Now go back the way we came.
for (powerA = 180; powerA >= 0; powerA --)
for (powerB = 180; powerB >= 0; powerB --)
{
ST1.write(powerA);
ST2.write(powerB);
delay(20);
}
}
/Backward Left**/
//If state is equal with letter ‘H’, TUG will go FORWARD RIGHT
}

7 below:

http://forum.arduino.cc/index.php/topic,148850.0.html