plps someone help me in programming my arduino for robot

i REALLY NEED HELP IN PROGRAMMING MY ARDUINO AS I AM A STUDENT AND I HAVE NO KNOWLEDGE OF COMPUTER PROGRAMMING. i HAVE Attached the file . And i use a adafruit motor driver instead of the pololu motor driver(which is used in the original program)which caused all the problems. I want it to be modifed or convert the pololu into adafruit,because i am using adafruit motor driver v2 (v2.3). Pls help me bexcaUSE IT IS FOR A PROJECT IN MY SCHOOL :frowning: . I REALLY APPPREACIATE any ones help. pls feel free to contact me at : .I have also attached the adafruit mototr driver v2.3 library.You can also download it from the official website
Thank You,

BB8s_Arduino_Code (1).zip (1.13 KB) (20.5 KB)

How did you get a school assignment for which you are not qualified?

#include "DualVNH5019MotorShield.h"
DualVNH5019MotorShield md;
#include <Servo.h>
Servo myservo; 

char dataIn='S';
char determinant;
char det;
int vel = 200; //Bluetooth Stuff

int overdrive = 13; //Press Toggle Switch #1, the pin13 LED will light up

void setup(){



void loop(){ det = check();  // You'll need to reconstruct this if your not using the Pololu Dual VNH5019
      while (det == 'F')   // F, move forward
       {md.setSpeeds(vel,vel);det = check();}
      while (det == 'B')   // B, move back
       {md.setSpeeds(-vel,-vel);det = check();}

      while (det == 'L')   // L, move wheels left
       {md.setSpeeds(-vel,vel);det = check();}
      while (det == 'R')   // R, move wheels right
       {md.setSpeeds(vel,-vel);det = check();}
      while (det == 'I')   // I, turn right forward
       {md.setSpeeds(vel,vel/2);det = check();}
      while (det == 'J')   // J, turn right back
       {md.setSpeeds(-vel,-vel/2);det = check();}  
      while (det == 'G')   // G, turn left forward
       {md.setSpeeds(vel/2,vel);det = check();}
      while (det == 'H')   // H, turn left back
       {md.setSpeeds(-vel/2,-vel);det = check();}  
      while (det == 'S')   // S, stop
       {md.setSpeeds(0,0);det = check();}
      //---------------------Toggle switch code------------------//
      /*while (det == 'W'){myservo.write(180);delay(100);det = check();} 
      while (det == 'w'){myservo.write(90);delay(100);det = check();} 
      while (det == 'U'){myservo.write(0);delay(100);det = check();} 
      while (det == 'u'){myservo.write(90);delay(100);det = check();} 


int check()
{if (Serial.available() > 0) {dataIn =; 
        if (dataIn == 'F'){determinant = 'F';} 
        else if (dataIn == 'B'){determinant = 'B';}else if (dataIn == 'L'){determinant = 'L';}
        else if (dataIn == 'R'){determinant = 'R';}else if (dataIn == 'I'){determinant = 'I';} 
        else if (dataIn == 'J'){determinant = 'J';}else if (dataIn == 'G'){determinant = 'G';}   
        else if (dataIn == 'H'){determinant = 'H';}else if (dataIn == 'S'){determinant = 'S';}
        else if (dataIn == '0'){vel = 400;}else if (dataIn == '1'){vel = 380;}
        else if (dataIn == '2'){vel = 340;}else if (dataIn == '3'){vel = 320;}
        else if (dataIn == '4'){vel = 280;}else if (dataIn == '5'){vel = 240;}
        else if (dataIn == '6'){vel = 200;}else if (dataIn == '7'){vel = 160;}
        else if (dataIn == '8'){vel = 120;}else if (dataIn == '9'){vel = 80;}
        else if (dataIn == 'q'){vel = 40;}
        else if (dataIn == 'U'){determinant = 'U';}else if (dataIn == 'u'){determinant = 'u';}
        else if (dataIn == 'W'){determinant = 'W';}else if (dataIn == 'w'){determinant = 'w';}
        }return determinant;}

The first step would be to remove the references to the Pololu library. Then remove all of the instances of ‘md.’. That leaves you with a bunch of calls to “setSpeeds()” and one call to “init()”. Read the documents for the motor controller you have to see how to write your own version of “setSpeeds()” using this template:

// Set speeds of left and right motors
// Speeds range from 400 (maximum speed forward) to -400 (maximum speed reverse)
void setSpeeds(int leftSpeed, int rightSpeed) {
// Set the speed of the left motor to 'leftSpeed'.
// Set the speed of the right motor to 'rightSpeed'.

Thank you.
I will do what you said and will update sooon.

What should I fill between thecalls for 'init()'?
What should i do with the ((-vel,-vel) ?
Should i set speed for every reference on setspeed () or just add set speed in the starting ?

Pls reply fast.
Regards ,

Pls reply fast.

When is our assignment due ?

To get further programming help you should post the newest version of your sketch. Before you do that you should read these two posts pinned at the top of the forum:

How to use this forum - please read.
Read this before posting a programming question ...