Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!
Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.
Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!
Ad Blocking Detected
Please consider disabling your ad blocker for our website.
We rely on these ads to be able to run our website.
You can of course support us in other ways (see Support Us).
[Solved] Error (Not declared in this scope)
(@bbkhawk)
New Member
Joined: 6 years ago
Posts: 2
Topic starter
September 23, 2018 2:10 AM
Hi again Hans,
I have a problem compiling a script.The leds were working fine until I added code for the heat detectors.Now I get theaterchase was not declared in this scope.I am sure I will get further errors too.I am very new to arduino coding.I hope someone can help.Code attached.
Thank you.
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2663
September 23, 2018 5:01 AM
Hi bbHawk,
Seems you forgot an close-accolade in line 35:
}
if (sensors.getTempCByIndex(1) >= 25) {
FAST();
}
Should be:
}
if (sensors.getTempCByIndex(1) >= 25) {
FAST();
}
}
Without the accolade the compiler gets confused since the loop is not closed.
Happens to the best of us ...
(@bbkhawk)
New Member
Joined: 6 years ago
Posts: 2
Topic starter
September 23, 2018 5:18 AM
Hi Hans,
Thank you for that much appreciated.I am now getting another error now.The section for Fast is not set up yet by the way.Too few arguments to function 'void theaterChase(byte,byte,byte,int)'
I have 3 books on Arduino programming arriving tomorrow.Hopefuly I will learn the coding (fingers crossed) :)
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2663
September 23, 2018 11:20 AM
Hi bbkHawk,
you're welcome!
You can make a dummy function for your FAST function - not sure what it's supposed to do? Fast version of theatre chase?
Eg. dummy FAST():
void FAST() {
serial.println("Going FAST");
}
And for the theatrechase you could fill in some random parameters:
theaterChase(0xff, 0, 0, 100); // red
Also, my intro course may or may not be helpful.
Ad Blocking Detected
Please consider disabling your ad blocker for our website.
We rely on these ads to be able to run our website.
You can of course support us in other ways (see Support Us).