Need help with ir_control


#1

Hi guys,
Sorry I think I posted this a minute ago in the wrong place…

I am new to this; bought a robot kit, but everytime I try to upload the ir_control example, I get this error:

‘MeDCMotor’ does not name a type

with the following at the bottom of the window (I guess in the error readout area?):

IR_Control:22: error: ‘MeDCMotor’ does not name a type
IR_Control:23: error: ‘MeDCMotor’ does not name a type
IR_Control:24: error: ‘MeInfraredReceiver’ does not name a type
IR_Control.ino: In function ‘void setup()’:
IR_Control:32: error: ‘infraredReceiverDecode’ was not declared in this scope
IR_Control.ino: In function ‘void loop()’:
IR_Control:38: error: ‘infraredReceiverDecode’ was not declared in this scope
IR_Control:42: error: ‘IR_BUTTON_PLUS’ was not declared in this scope
IR_Control:45: error: ‘IR_BUTTON_MINUS’ was not declared in this scope
IR_Control:48: error: ‘IR_BUTTON_NEXT’ was not declared in this scope
IR_Control:51: error: ‘IR_BUTTON_PREVIOUS’ was not declared in this scope
IR_Control:54: error: ‘IR_BUTTON_9’ was not declared in this scope
IR_Control:57: error: ‘IR_BUTTON_8’ was not declared in this scope
IR_Control:60: error: ‘IR_BUTTON_7’ was not declared in this scope
IR_Control:63: error: ‘IR_BUTTON_6’ was not declared in this scope
IR_Control:66: error: ‘IR_BUTTON_5’ was not declared in this scope
IR_Control:69: error: ‘IR_BUTTON_4’ was not declared in this scope
IR_Control:72: error: ‘IR_BUTTON_3’ was not declared in this scope
IR_Control:75: error: ‘IR_BUTTON_2’ was not declared in this scope
IR_Control:78: error: ‘IR_BUTTON_1’ was not declared in this scope
IR_Control.ino: In function ‘void Forward()’:
IR_Control:96: error: ‘MotorL’ was not declared in this scope
IR_Control:97: error: ‘MotorR’ was not declared in this scope
IR_Control.ino: In function ‘void Backward()’:
IR_Control:101: error: ‘MotorL’ was not declared in this scope
IR_Control:102: error: ‘MotorR’ was not declared in this scope
IR_Control.ino: In function ‘void TurnLeft()’:
IR_Control:106: error: ‘MotorL’ was not declared in this scope
IR_Control:107: error: ‘MotorR’ was not declared in this scope
IR_Control.ino: In function ‘void TurnRight()’:
IR_Control:111: error: ‘MotorL’ was not declared in this scope
IR_Control:112: error: ‘MotorR’ was not declared in this scope
IR_Control.ino: In function ‘void Stop()’:
IR_Control:116: error: ‘MotorL’ was not declared in this scope
IR_Control:117: error: ‘MotorR’ was not declared in this scope

How do I fix this? I have done the blink example, so at least I know its talking with my computer, and if I push the direction buttons on the remote the blue LED is lighting up on the Makeblock infrared receiver plugged into pin 6, but I really really don’t know anything about this stuff, and am just trying to see if I can get the robot to move.
Thanks for any help you can give me


#2

try to update the latest library for makeblock, https://github.com/Makeblock-official/Makeblock-Library and the ir example: https://github.com/Makeblock-official/Makeblock-Library/blob/master/makeblock/examples/Makeblock_Robot_Starte_Kit/IR_Control/IR_Control.ino


#3

Hi, addynichols, I think @indream is right, you need to confirm that the library version is 2.1.0217.


#4

Thanks for the responses guys, but as far as I can see I did download the latest library/ir_control example.
Any other ideas, or is there someone who can walk me through verifying that I do have the latest?
Both of those links point to where I got them from, and the ir example header info is exactly the same as what I have


#5

hi,addynichols, check the library installation path first,your Arduino library folder should now look like this (on Windows):
My Documents\Arduino\libraries\Makeblock\Makeblock.cpp

My Documents\Arduino\libraries\Makeblock\Makeblock.h

My Documents\Arduino\libraries\Makeblock\examples …

or like this (on Mac):

Documents/Arduino/libraries/Makeblock/Makeblock.cpp

Documents/Arduino/libraries/Makeblock/Makeblock.h

Documents/Arduino/libraries/Makeblock/examples …

then you can open Makeblock.h file, the first line will show the library’s version number.


#6