Make It Robotics Starter Kit Line following help


I loaded up this code in the Arduino Uno R3, to make the line following robot program. When I tried to verify it, I kept on getting errors. I copied the error messages:

Arduino: 1.6.8 (Windows 7), Board: “Arduino/Genuino Uno”

C:\Users\Xie\Documents\Arduino\sketch_apr27a\sketch_apr27a.ino:23:45: fatal error: MakeItRobotics.h: No such file or directory

#include <MakeItRobotics.h>//include library


compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.


// * File Name : linefollow
// * Author : RadioShack Corporation
// * Version : V1.0
// * Date : 2014/01/16
// * Description : Optical sensors send feedback to PCB
// * to make the robot follow a black line on a white background.
// ********************************************************************************
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see
// ********************************************************************************

#include <MakeItRobotics.h>//include library
MakeItRobotics line_following;//declare object
// **************************************************************************
// * Power Up Initial
// **************************************************************************
void setup()
Serial.begin(10420); //tell the Arduino to communicate with Make: it PCB
delay(500); //delay 500ms
line_following.line_following_setup(); //initialize the status of line following robot
line_following.all_stop(); //all motors stop
// **************************************************************************
// * Main Loop
// **************************************************************************
void loop()
static int sensor_in; //variable to store the value of read_optical function feedback
static int sensorValue1 = 0; //variable to store optical1 status
static int sensorValue2 = 0; //variable to store optical2 status
static int sensorCnt = 0; //variable to count for trigger which optical
static long sensorTimer1 = millis(); //last triggered time
static long sensorTimer2 = millis(); //now time
static int action1 = 0; //now action
static int action2 = 0; //last action
// Trigger Left/Right optical every 15 milliseconds
sensorTimer2 = millis(); //read now time
if (sensorTimer2 - sensorTimer1 > 15) //if now time minus last triggered time is greater than 15ms, then trigger another optical
sensorTimer1 = sensorTimer2; //last triggered time = now time

→ trigger optical1 → greater than 15ms → trigger optical2 → greater than 15ms →

if (sensorCnt == 0)
else if (sensorCnt == 1)
if (sensorCnt == 2)
sensorCnt = 0;

// Read Left/Right optical status
Reads the value from optical1(Right side) or optical2(Left side)
0x000 optical1 black
0x0ff optical1 white
0x100 optical1 white
0x1ff optical1 black
0x2XX not ready; don’t use this value
if((sensor_in & 0xf00)==0)
sensorValue1=sensor_in & 0xff;
else if((sensor_in & 0xf00)>>8==1)
sensorValue2=sensor_in & 0xff;
if (sensorValue1 == 0x00)
action1 =action1 & 0xfe;
if (sensorValue1 == 0xFF)
action1 = action1 | 0x01;
if (sensorValue2 == 0x00)
action1 = action1 | 0x02;
if (sensorValue2 == 0xFF)
action1 = action1 & 0xfd;

left right
0x00 black black
0x01 black white
0x02 white black
0x03 white white

Make Robot Move
if action1 is not equal to action2, then change motor status
if action1 is equal to action2, then do nothing
if(action1 != action2)
if (action1 == 3 )
if (action1 == 1)
if (action1 == 2)
if (action1 == 0)

Do you actually have the file MakeItRobotics.h and if so, where is it located ?

No, it seems I do not have a file named that. Do you know where I can get it?

aznmonkey: No, it seems I do not have a file named that. Do you know where I can get it?

Wherever you got the robot kit or that code.

I got the code of of github because the original website is down. I downloaded all the files on there which were these: Example sketches
Library files
Support files
User’s Guides

I downloaded all the files on there

But you are not going to tell us where you got them, or what all the files were. Well, good luck, then.

Sorry, this is the link to the files The example sketches is where the code is(linefollow and walk). The library files just contain directions on how to install the code. The support files are pcb schematics and the last two are just licenses

The example on that page contains:

#include <RadioShackRobotics.h>//include library
RadioShackRobotics line_following;//declare object

Your code uses something else. Please explain.

The file RadioShackRobotics.h wasn't part of the files I found on Github. Also when I tried to add the linefollow code as a library, but the IDE said I had an invalid library.

aznmonkey: No, it seems I do not have a file named that. Do you know where I can get it?

By the power uf Google I found

Oh Wow, thanks UKHeliBob! I will try this code out.

Uh I know this may sound stupid but I don't know where to put the makeitrobotics.h files. Like do I only insert the line folllow section and where do I put it(in the void setup section, after #include,...)?

  • Go to the link that UKHB posted

  • Click the link labeled 2770168-MakeItRobotics-Starter-Kit to go up two levels

  • Click Download Zip to get the library

  • Unzip the file and under 2770168-MakeItRobotics-Starter-Kit-master you should see a Library folder that contains a MakeItRobotics folder.

  • Copy the MakeItRobotics folder to your Arduino/libraries folder

Now the code you posted should compile - it did for me.

YAYYYY!!!! It finally compiled and the wheels started turning. Thanks for the instructions.

Copy the MakeItRobotics folder to your Arduino/libraries folder

Whilst the library will be available if copied to that folder it should really be in the libraries folder of your sketches folder.

So, what's the difference ? Well, if you put it in the right place it will be available if/when you upgrade the IDE whereas if you put it in the suggested folder it will not be available after an IDE upgrade.

PaulS: But you are not going to tell us where you got them, or what all the files were. Well, good luck, then.

I'm glad someone posted in this thread eventually. It was very helpful.

The original link to the Radio Shack code has been gone a while, and the GitHub files don't really come with much explanation, so if someone wants to work on any of these old kits they have to go to GitHub to get the existing code. It seems that somewhere along the line the library files got renamed. It isn't our code, it's Radio Shack's code. So thanks to the folks who actually provided help instead of stonewalling.

The main directory for GitHub and Radio Shack is

and it contains the files for the robotics stuff that's floating around out there.