Page 1 of 1
Forum

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!



Error (Not declared...
 
Share:
Notifications
Clear all

[Solved] Error (Not declared in this scope)

4 Posts
2 Users
0 Reactions
3,720 Views
(@bbkhawk)
New Member
Joined: 7 years ago
Posts: 2
Topic starter  

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.


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
 

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 ... 


   
ReplyQuote
(@bbkhawk)
New Member
Joined: 7 years ago
Posts: 2
Topic starter  

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) :)


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
 

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. 


   
ReplyQuote
Share: