Hi there I'm new to C++ and I'm having trouble with some code for a small robot I'm building called Magbot which I found in a magazine. IM currently trying to build the final robot but the code that came with the robot reports some errors when I try to verify it in the Arduino IDE. I would be extremely grateful if someone could take a look at the code and possibly provide me with a solution as I've bought all the robot parts and really would like to get it finished. Here are the errors:
Magbot:145: error: 'decode_results' does not name a type
Magbot:151: error: 'IRrecv' does not name a type
Magbot.ino: In function 'void setup()':
Magbot:194: error: 'irrecv' was not declared in this scope
Magbot.ino: In function 'void loop()':
Magbot:240: error: 'irrecv' was not declared in this scope
Magbot:240: error: 'results' was not declared in this scope
The code is too long to paste in here I've tried but could send you it if you needed a look. Many thanks
"was not declared in this scope" should be fairly easy to fix/spot. I see that it's not happy with "IRrecv" in some cases and "irrecv" in others. Is this perhaps an uppercase/lowercase variable issue?
thanks for your reply. I have solved one problem, I simply needed to add a library to the project containing what was needed. Now I am just left with these errors:
Magbot.ino: In function 'void loop()':
Magbot:240: error: 'results' was not declared in this scope
this piece of code concerned:
void loop()
{
// Check for a new IR code
if (irrecv.decode(&results)) {
// Cet the button name for the received code
irHandleInput(results.value);
// Start receiving codes again
irrecv.resume();
}
// Let the timers do their thing.
timer.run();
actionRun();
snd.update();
}