Remove these ads by
Signing UpStep 1: Build list...
1. Pololu Zumo chassis http://www.zagrosrobotics.com/shop/item.aspx?itemid=884
2. DRV8833 dual motor driver http://www.zagrosrobotics.com/shop/item.aspx?itemid=879
3. Arduino Uno or compatible http://www.zagrosrobotics.com/shop/item.aspx?itemid=868
4. Bluetooth modem http://www.zagrosrobotics.com/shop/item.aspx?itemid=883
5. Android phone or tablet
Along with that list of parts for the robot you are going to need these basic things to build and program your robot
1, Computer with the Arduino IDE http://arduino.cc/en/Main/Software
2. Soldering iron
3. Some solder and wires










































Visit Our Store »
Go Pro Today »




Cheers
/* Here is a work in progress based on file found at http://www.instructables.com/id/Beginners-guide-to-building-Arduino-robots-with-Bl/
I the following changes from the original:
1) Power pins are 3 and 11 and digital pins are 12 and 13 to work with the Ardumoto motor control shield. https://www.sparkfun.com/products/9815?
2) MDFLY bt tranceiver defaults to 9600 baud http://www.mdfly.com/index.php?main_page=product_info&cPath=8_47&products_id=769
3) Serial monitor test will not work with Ardumoto in place because MDFLY uses serial pin 0/tx.
4) Case statements had to be completely reworked with matching serial output
5) Added forward and reverse veering case statements with 100/190 power bias.
6) Left and right cases feature20% power counter rotating tracks for on the spot zero radius turns.
7) Max_Control App -- https://www.box.com/s/8b06bcee9ec84ec70a72 this works perfectly but workin in progress to map veering keys to the interface
If you have questions or comments contact me @ celtic.smile.762@gmail.com */
int r_motor_n = 12; //PWM control Right Motor -
int r_motor_p = 3; //PWM control Right Motor +
int l_motor_p =11; //PWM control Left Motor +
int l_motor_n = 13; //PWM control Left Motor -
int incomingByte = 0; // for incoming serial data
void setup()
{
pinMode(r_motor_n, OUTPUT); //Set control pins to be outputs
pinMode(r_motor_p, OUTPUT);
pinMode(l_motor_p, OUTPUT);
pinMode(l_motor_n, OUTPUT);
digitalWrite(r_motor_n, LOW); //set both motors off for start-up
digitalWrite(r_motor_p, LOW);
digitalWrite(l_motor_p, LOW);
digitalWrite(l_motor_n, LOW);
Serial.begin(9600);
Serial.print("Enter keys -- q, f, e, l, b, r, z, c for drive control \n");
Serial.print("w = Forward \n");
Serial.print("s = Backward \n");
Serial.print("d = Right \n");
Serial.print("a = Left \n");
Serial.print("q = frwd_veer left \n");
Serial.print("e = frwd_veer right \n");
Serial.print("z = rev_veer left \n");
Serial.print("c = rev_veer right \n");
Serial.print("x = Stop \n");
Serial.print("Zagros Robotics, Inc.");
}
void loop()
{
if (Serial.available() > 0) {
// read the incoming byte:
incomingByte = Serial.read();
}
switch(incomingByte)
{
case 's':
digitalWrite(r_motor_n, LOW);
digitalWrite(r_motor_p, LOW);
digitalWrite(l_motor_p, LOW);
digitalWrite(l_motor_n, LOW);
Serial.println("Stop\n");
incomingByte='*';
break;
case 'r':
digitalWrite(r_motor_n, LOW);
analogWrite(r_motor_p, 50);
digitalWrite(l_motor_n, HIGH);
analogWrite(l_motor_p, 50);
Serial.println("Right\n");
incomingByte='*';
break;
case 'e':
digitalWrite(r_motor_n, HIGH);
analogWrite(r_motor_p, 100);
digitalWrite(l_motor_n, HIGH);
analogWrite(l_motor_p, 190);
Serial.println("veer Left\n");
incomingByte='*';
break;
case 'l':
analogWrite(r_motor_p, 50);
digitalWrite(r_motor_n, HIGH);
analogWrite(l_motor_p, 50);
digitalWrite(l_motor_n, LOW);
Serial.println("Left\n");
incomingByte='*';
break;
case 'q':
digitalWrite(r_motor_n, HIGH);
analogWrite(r_motor_p, 190);
digitalWrite(l_motor_n, HIGH);
analogWrite(l_motor_p, 100);
Serial.println("Veer Right\n");
incomingByte='*';
break;
case 'f':
digitalWrite(r_motor_n, HIGH);
analogWrite(r_motor_p, 190);
analogWrite(l_motor_p, 190);
digitalWrite(l_motor_n, HIGH);
Serial.println("Forward\n");
incomingByte='*';
break;
case 'b':
analogWrite(r_motor_p, 190);
digitalWrite(r_motor_n, LOW);
digitalWrite(l_motor_n, LOW);
analogWrite(l_motor_p, 190);
Serial.println("Back\n");
incomingByte='*';
break;
case 'c':
analogWrite(r_motor_p, 190);
digitalWrite(r_motor_n, LOW);
digitalWrite(l_motor_n, LOW);
analogWrite(l_motor_p, 100);
Serial.println("Veer Back Right\n");
incomingByte='*';
break;
case 'z':
analogWrite(r_motor_p, 100);
digitalWrite(r_motor_n, LOW);
digitalWrite(l_motor_n, LOW);
analogWrite(l_motor_p, 190);
Serial.println("Veer Back Right\n");
incomingByte='*';
break;
case 'v':
Serial.print("MiniBot Version 8/4/2012 ");
Serial.println();
Serial.print("Zagros Robotics, Inc.");
incomingByte='*';
break;
delay(5000);
}
}
We also have a basic Ardumoto example on our website:
http://www.zagrosrobotics.com/files/Motor_Control_09192010.zip
Ive never used Arduinos before so I have a few questions.
Would an Arduino Nano v3 work in this application?
Can I use this bluetooth module?
http://dx.com/p/jy-mcu-arduino-bluetooth-wireless-serial-port-module-104299