Error Message: "RedBotMotors"

I try to run the RedBot Sketch “Drive Forward”, and get an error message that “RedBotMotors” is not a type.

I can load the ‘Blink” sketch ok.

I see the RedBot folder in the library folder. What is the problem?

I am a beginner, and this is very frustrating!! Thanks for any help.

Can you post a link to the exact sketch you used, or post the code itself ? My guess is you’re missing a file in the folder (a list of files in or screenshot of the Redbot folder would be nice) or an #include<> at the top of the sketch or have a path name wrong.

Mee_n_Mac;

Thanks for the quick reply!

Here is the code for the sketch “Drive Forward”. The 2nd line, “RedBotMotors motors;” shows an error…“THIS IS NOT A TYPE.”

#include <RedBot.h> // This line “includes” the RedBot library into your sketch.

// Provides special objects, methods, and functions for the RedBot.

RedBotMotors motors; // Instantiate the motor control object. This only needs

// to be done once.

void setup()

{

motors.drive(255); // Turn on Left and right motors at full speed forward.

delay(2000); // Waits for 2 seconds

motors.stop(); // Stops both motors

}

void loop()

{

// Nothing here. We’ll get to this in the next experiment.

}

Here is a screen shot of the contents of the RedBot folder in the Libraries folder.

/Users/21imac/Desktop/RedBotLibraryScreen%20Shot.jpg

Here is a Screenshot of the path to the library folder:

/Users/21imac/Desktop/PathScreenShot.jpg

I hope these images show…my screen just shows the images file names!

Thanks!

Bruce.

Here, I hope, are the images:

/Users/21imac/Desktop/RedBotLibraryScreen%20Shot.jpg

Path:

/Users/21imac/Desktop/PathScreenShot.jpg

I’m afraid these are not going to show!

Here are the files listed in the RedBot folder in the library:

desktop.ini
RedBot_Experiments
RedBot.cpp
RedBot.h
RedBotAccel.cpp
RedBotBumper.cpp
RedBotButton.cpp
RedBotEncoder.cpp
RedBotMotors.cpp
RedBotRadio.cpp
RedBotSensor.cpp
RedBotSoftwareSerial.cpp
RedBotSoftwareSerial.h

I see the ‘Bold’ Option does not work.

Here is the path to the library: MacHD/Applications/Arduino/Contents/Resources/JAVA/Libraries/RedBot

Thanks again;

Bruce.

We can’t see files on your computer. You can attach images to a post here. Click “Post Reply” > “Upload Attachment” tab. Click “Browse”, then search for the image.

The library should be Documents/Arduino/libraries/RedBot/… (If you’re on a Windows machine.)

My path to libraries, on my Mac, is:

MacHD/Applications/Arduino/Contents/Resources/JAVA/Libraries/RedBot

But…I solved the problem with the error message…the code referenced “RedBotMotors”…the correct reference was “RedBotMotor”…NO “S”.

So now my sketch compiles ok…but now I get an error “Problem uploading to board”…I’ve tried both USB ports available, and the only 2 Board that references the ATmega 1280 board…I also installed FDLI (?) drivers, as I saw in one post they solved the problem for Yosemite on my Mac.

Any suggestions?

Thanks…Bruce.

I don’t know about your “fix” above. The C++ file is RedBotMotors.cpp. I’d have thought the Redbot folder should have been in a Libraries folder directly under the Arduino folder … but I’m on a PC.

**MacHD/Applications/Arduino/Libraries/RedBot**

Note the Mac comments here …

http://arduino.cc/en/Guide/Libraries

So I’m stumped…if I add an “s” to RedBotMotor in the sketch it tells me that “it is not a type”.

With the “S” it compiles ok, but fails to upload. The detailed error message adds “programmer is not responding”.

I’ll delete everything, and download it the software again…tomorrow. I worry that it is a problem with the Yosemite OS…others mention that.

Thanks anyway.

Bruce.

Totally stumped!

I deleted everything related to Arduino and RedBot, and downloaded the software and the library again.

The ‘Blink’ sketch can be verified and compiled, but will not upload. Error Message: Programmer not responding.

I’m worried that it is some incompatibility with the Mac OS 10.10.1 "Yosemite’'.

Any suggestions??

My guess is that you have 2 problems; a RedBotMotors path problem and then a driver problem visavis a Mac. I can’t help you on the latter.

The Arduino forums will be able to help you with the Mac.

Thanks. I finally got it worked out.

After the help we gave you why not tell everyone what you did?

I deleted all Arduino things again, downloaded the software and the RedBot Library, installed the Software and Libraries.

Then I chose Arduino Uno board, instead of the ATmega 1280, and it works!!

I’m not sure what became of the Sketchbook folder during installation, but I simply put the RedBot example scripts in a folder from which I can open them.

NOW…I hope to begin to learn the code, as I want to do some projects using light sensors (Photo transistors I think) and also ultrasonic range finding. The electronics and the coding look complex…hoping I can get on to them a step at a time.

Valentino Braitenberg wrote a book “Vehicles” which suggests generations of very simple vehicles which display apparent intelligent behavior. I’d like to build a swarm, some acting as predators, some as prey, and maybe build in some apparent learning…there are some good YouTube examples…using Lego Windstorms…see: https://www.youtube.com/watch?v=G6tlJkRXG3c and https://www.youtube.com/watch?v=NJo5HEdq6y0

Bruce.