problem uploading code to arduino uno eroor message

so I was programming my Arduino uno today and I tried to upload my code which is

#include <AFMotor.h>
#include <QTRSensors.h>

AF_DCMotor motor1(1, MOTOR12_8KHZ );
AF_DCMotor motor2(2, MOTOR12_8KHZ );

#define KP .2
#define KD 5
#define M1_minumum_speed 150
#define M2_minumum_speed 150
#define M1_maksimum_speed 200
#define M2_maksimum_speed 200
#define NUM_SENSORS 5
#define TIMEOUT 2500
#define EMITTER_PIN 2
#define DEBUG 0

QTRSensorsRC qtrrc((unsigned char) { A4,A3,A2,A1,A0} ,NUM_SENSORS, TIMEOUT, EMITTER_PIN);

unsigned int sensorValues[NUM_SENSORS];

void setup()

int lastError = 0;
int last_proportional = 0;
int integral = 0;

void loop()

unsigned int sensors[5];
int position = qtrrc.readLine(sensors);
int error = position - 2000;

int motorSpeed = KP * error + KD * (error - lastError);
lastError = error;

int leftMotorSpeed = M1_minumum_speed + motorSpeed;
int rightMotorSpeed = M2_minumum_speed - motorSpeed;

// set motor speeds using the two motor speed variables above
set_motors(leftMotorSpeed, rightMotorSpeed);

void set_motors(int motor1speed, int motor2speed)
if (motor1speed > M1_maksimum_speed ) motor1speed = M1_maksimum_speed;
if (motor2speed > M2_maksimum_speed ) motor2speed = M2_maksimum_speed;
if (motor1speed < 0) motor1speed = 0;
if (motor2speed < 0) motor2speed = 0;

void manual_calibration() {

int i;
for (i = 0; i < 250; i++){


if (DEBUG) {


for (int i = 0; i < NUM_SENSORS; i++){


  • Serial.print(’ ');*

  • Serial.println();*

  • for (int i = 0; i < NUM_SENSORS; i++){*

_ Serial.print(qtrrc.calibratedMaximumOn*);_
Serial.print(’ ');_
and when I tried to verify or upload I got this message
error compiling for board Arduino/genuino uno
i don’t know whats wrong plz help me somebody I would really sppreciate it if I did something wrong writing with the code plz let me know
also says fatal error: AFMotor . h: no such file or directory found
so I would appreciate the help if you can offer project I have is due January 23rd 2017

Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. Using code tags and other important information is explained in the How to use this forum post. Please read it.

Take a look at the code you posted. Do you see how it changes to italics towards the end. That’s because the forum interpreted part of your code as markup for italics. This sort of thing is exactly why it is so important for you to use code tags.

Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read.

When you encounter an error message you’ll see a button on the right side of the orange bar “Copy error messages”. Instead of paraphrasing some fragment of the error output you should instead click that button and then paste the full error output to the forum using code tags.

also says fatal error: AFMotor . h: no such file or directory found

You need to install the library. Please do this:

  • Sketch > Include Library > Manage Libraries…
  • Type “adafruit motor v1” in the “Filter your search…” box
  • Click on the “Adafruit Motor Shield library by Adafruit” item.
  • Click “Install”
  • Wait for installation to complete.
  • Click “Close”
  • Try uploading your code again.