Home computickets Error: 'Butt_flag' Was Not Declared in This Scope

Error: ‘Butt_flag’ Was Not Declared in This Scope

Author

Date

Category

Error compiling the program in the Arduino IDE development environment.

C: \ Users \ 717177 \ Desktop \ Arduinofirzt \ Arduinofirzt.ino: in function ‘void loop ()’:
Arduinofirzt: 12: 20: Error: ‘Butt_flag’ Was Not Declared in This Scope
if (butt == 1 & amp; & amp; butt_flag == 0)
^ ~~~~~~~~
C: \ Users \ 717177 \ Desktop \ Arduinofirzt \ Arduinofirzt.ino: 12: 20: Note: Suggested Alternative: ‘But_Flag’
if (butt == 1 & amp; & amp; butt_flag == 0)
^ ~~~~~~~~
But_Flag
Arduinofirzt: 20: 20: Error: ‘Butt_flag’ Was Not Declared in This Scope
if (butt == 0 & amp; & amp; butt_flag == 1)
^ ~~~~~~~~
C: \ Users \ 717177 \ Desktop \ Arduinofirzt \ Arduinofirzt.ino: 20: 20: Note: Suggested Alternative: ‘But_Flag’
if (butt == 0 & amp; & amp; butt_flag == 1)
^ ~~~~~~~~
But_Flag
EXIT STATUS 1.
‘Butt_flag’ Was Not Declared in This Scope

Code:

boolean but_flag = 0;
Boolean Butt;
void setup ()
{
Pinmode (3, Input_Pullup);
}
void loop ()
{
Butt =! DigitalRead (3);
if (butt == 1 & amp; & amp; butt_flag == 0)
{
beutt_flag = 1;
Serial.printLN ("Button Press");
}
if (butt == 0 & amp; & amp; butt_flag == 1)
{
beutt_flag = 0;
Serial.println ("Button Released");
}
}

Sorry, I’m probably a pervert, but I just like to put brackets)


Answer 1, Authority 100%

You have a variable but_flag, and you use But T _Flag

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions