ARDUINO AIRSOFT TIME BOMB GAME

14,175

27

74

Posted in TechnologyArduino

Introduction: ARDUINO AIRSOFT TIME BOMB GAME

About: Hello world! I make simple & Advanced projects for people who want to learn programming and electronics. Most of my Instructables are about arduino and the wide range of sensors you can use with it. I ma...

Take a look at the video to see it at work.

Check the next steps for the Schematic and code.

Step 1: The Schematic and Parts List.

Just connect it as the schematic shows. Upload the code and it should work.

I added a on/off switch a reset button and a power jack, those are not

shown on the schematic but easy to add.

To add a reset button just add a button to the reset pin, put one wire in the

reset pin and one in ground.

You can also add extra buttons for C and D as shown on the schematic.

My final project will have a red button for the red team and green for green team.

Parts list.

  1. Arduino UNO
  2. Potentiometer (+ knob optional)
  3. buzzer
  4. On/Off switch
  5. 1 Channel relay
  6. lcd 1602 - Blue Backlight
  7. 4x4 Keypad
  8. 2x Red leds, 1x green led.
  9. 2x 220 Ohm (220 R) resistors
  10. A set of MM FF MF Jumper wires
  11. Female Power jack & adapter (optional) (You can also add batterys of course)
  12. 2 buttons for C & D(optional)
  13. 1 button for reset (optional)
  14. Alarm Strobe? Alarm Sound?

(i used male and female audio plugs to connect the lamp)


Step 2: The Code.

There are multiple codes inside.

Open and upload the Time_Bomb_Airsoft_Game.ino

If you connected everything the right way it should work right away.

Be creative! make a nice enclosure for it.

Good luck!

4 People Made This Project!

Recommendations

  • Microcontroller Contest

    Microcontroller Contest
  • Space Challenge

    Space Challenge
  • Science of Cooking

    Science of Cooking
user

We have a be nice policy.
Please be positive and constructive.

Tips

4 Questions

0

Arduino:1.8.1 (Windows XP), Tarjeta:"Arduino/Genuino Uno"

C:\Documents and Settings\Administrador\Escritorio\BombaArduino\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:2:20: fatal error: Keypad.h: No such file or directory

#include

^

compilation terminated.

exit status 1
Error compilación en tarjeta Arduino/Genuino Uno.

mi tarjeta es arduino funduino y me da estos errores y no se como solucionarlo.
me podeis ayudar?

Channel relay is to put one external alimentation right?

No its to use the "extras" like the light, fireworks, etc....to use external alimentation just plug the + to vin and - to gnd on the board...I use a 9v battery

Hi, the aditional buttons tha you use to the C and D, is 2 pin or 4 pin? on mine i have a strip RGB led, and don´t work well with this code, can you help me?

when i compile the code it gives me a lot of errors. how can i fix this?

74 Comments

Hi guys

Im struggeling, i have managed to upload the code and i have wired everything correctly by using to drawings from 2 different makers, where they ar the same.

However, when i power on.. there is a tiny frequensy sound from the buzzer, both led blink one time fast, then both blink again and the red lights up constantly.

There are no digits or symbols on the lcd. I can adjust backlight brightness, but still no symbols.

Hope some can help me. Maybe go over it with me over Teamviewer?

My email is: lofte87@gmail.com

Have a nice day and a nice easter

Best regards

Morten from Norway

2 replies

1 I have the same problem, can you help me, please?

I fixed it. I would like the relay to be activated when a game is over. Now the relay trigger when the bomb goes off in Search&Destroy :/
Reason is that I can but a siren on when the game ends.
Pleeeeease help anyone

Does anyone have a "How To" guide on playing this game? I'm looking for a step-by-step guide on how to play all three games after the project is assembled and the code is uploaded. I have completed all of that and would really like some help on how to actually use it. Thank you.

nobody can share a code that works?

Hello. I can not understand why it does not work on arduino pro mini? On arduino uno everything works well. On the LCD screen, it is found to serch&destroy, but keyboard input is not possible. I've tried everything to fix it, but it does not work out. Please write to my email address nanofaradc@list.ru

3 replies

Артем,используй обычную плату Ардуино. Все прекрасно работает( правда у меня 2 кнопки подключеные к клавиатуре не работают ).Все остальные режимы показывают отличные результаты.

Я то ведь хотел компактным сделать, заказал 3 ардуинки про мини, думал сделаю все норм будет, в итоге не фига не работает. Главное на ЖК дисплее все норм высвечивается, а управление с клавиатуры не работает((( https://www.youtube.com/watch?v=zk9jqAJWMQs&t=1s

Насколько компактным? В любом случае и сама плата и блок с батареями займет место.
Проект и сама схема вполне себе рабочая. Подтверждаю.

hello , where in code i can setup the 14. alarm sound when game is ending ( for all scenario ) and how to plug light / alarm with relay to arduino d9 pins ?

thanks for repplying , best regards

Hello .. Good evening. I have a pump project for AIRFSOT and I looked at your project and I interceded for it, I do not know anything about programming, I downloaded your code and put it to run on Arduino and presented the errors below ... how can I solve this ... ?? ? Can you help me .... ????
Thank you ... !!!!!

time_bomb:196: error: variable or field 'keypadEvent' declared void

void keypadEvent(KeypadEvent key){

^

time_bomb:196: error: 'KeypadEvent' was not declared in this scope

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\bomba_0_0.ino: In function 'void menuPrincipal()':

bomba_0_0:5: error: 'GREENLED' was not declared in this scope

digitalWrite(GREENLED, LOW);

^

bomba_0_0:6: error: 'REDLED' was not declared in this scope

digitalWrite(REDLED, LOW);

^

bomba_0_0:9: error: 'saStatus' was not declared in this scope

saStatus=false;

^

bomba_0_0:10: error: 'sdStatus' was not declared in this scope

sdStatus=false;

^

bomba_0_0:11: error: 'doStatus' was not declared in this scope

doStatus=false;

^

bomba_0_0:16: error: 'lcd' was not declared in this scope

lcd.print(menu1[i]);

^

bomba_0_0:16: error: 'menu1' was not declared in this scope

lcd.print(menu1[i]);

^

bomba_0_0:21: error: 'var' was not declared in this scope

var = keypad.waitForKey();

^

bomba_0_0:21: error: 'keypad' was not declared in this scope

var = keypad.waitForKey();

^

bomba_0_0:22: error: 'BT_UP' was not declared in this scope

if(var == BT_UP && i>0){

^

bomba_0_0:23: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:30: error: 'BT_DOWN' was not declared in this scope

if(var == BT_DOWN && i<2){

^

bomba_0_0:31: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:39: error: 'BT_SEL' was not declared in this scope

if(var == BT_SEL){

^

bomba_0_0:40: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\bomba_0_0.ino: In function 'void config()':

bomba_0_0:74: error: 'lcd' was not declared in this scope

lcd.clear();

^

bomba_0_0:79: error: 'menu2' was not declared in this scope

lcd.print(menu2[i]);

^

bomba_0_0:83: error: 'var' was not declared in this scope

var=keypad.waitForKey();

^

bomba_0_0:83: error: 'keypad' was not declared in this scope

var=keypad.waitForKey();

^

bomba_0_0:84: error: 'BT_UP' was not declared in this scope

if(var == BT_UP && i>0){

^

bomba_0_0:85: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:93: error: 'BT_DOWN' was not declared in this scope

if(var == BT_DOWN && i<3){

^

bomba_0_0:94: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:101: error: 'BT_CANCEL' was not declared in this scope

if(var == BT_CANCEL){

^

bomba_0_0:102: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:105: error: 'BT_SEL' was not declared in this scope

if(var == BT_SEL){

^

bomba_0_0:106: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:121: error: 'RELAYPIN' was not declared in this scope

digitalWrite(RELAYPIN, HIGH); // turn the LED on (HIGH is the voltage level)

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\bomba_0_0.ino: In function 'void configQuickGame()':

bomba_0_0:139: error: 'sdStatus' was not declared in this scope

if(sdStatus || doStatus || saStatus){

^

bomba_0_0:139: error: 'doStatus' was not declared in this scope

if(sdStatus || doStatus || saStatus){

^

bomba_0_0:139: error: 'saStatus' was not declared in this scope

if(sdStatus || doStatus || saStatus){

^

bomba_0_0:142: error: 'lcd' was not declared in this scope

lcd.print(GAME_TIME);

^

bomba_0_0:142: error: 'GAME_TIME' was not declared in this scope

lcd.print(GAME_TIME);

^

bomba_0_0:160: error: 'time' was not declared in this scope

time[i] = varu;

^

bomba_0_0:165: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:178: error: 'var' was not declared in this scope

var = keypad.waitForKey();

^

bomba_0_0:178: error: 'keypad' was not declared in this scope

var = keypad.waitForKey();

^

bomba_0_0:181: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:182: error: 'GAMEMINUTES' was not declared in this scope

GAMEMINUTES= ((time[0]*600)+(time[1]*60)+(time[2]*10)+(time[3]));

^

bomba_0_0:182: error: 'time' was not declared in this scope

GAMEMINUTES= ((time[0]*600)+(time[1]*60)+(time[2]*10)+(time[3]));

^

bomba_0_0:187: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:191: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:195: error: 'sdStatus' was not declared in this scope

if(sdStatus || saStatus){

^

bomba_0_0:195: error: 'saStatus' was not declared in this scope

if(sdStatus || saStatus){

^

bomba_0_0:199: error: 'lcd' was not declared in this scope

lcd.print(BOMB_TIME);

^

bomba_0_0:199: error: 'BOMB_TIME' was not declared in this scope

lcd.print(BOMB_TIME);

^

bomba_0_0:202: error: 'ZERO_MINUTES' was not declared in this scope

lcd.print(ZERO_MINUTES);

^

bomba_0_0:210: error: 'time' was not declared in this scope

time[i] = varu;

^

bomba_0_0:212: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:224: error: 'var' was not declared in this scope

var = keypad.waitForKey();

^

bomba_0_0:224: error: 'keypad' was not declared in this scope

var = keypad.waitForKey();

^

bomba_0_0:227: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:228: error: 'BOMBMINUTES' was not declared in this scope

BOMBMINUTES= ((time[0]*10)+(time[1]));

^

bomba_0_0:228: error: 'time' was not declared in this scope

BOMBMINUTES= ((time[0]*10)+(time[1]));

^

bomba_0_0:233: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:237: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:242: error: 'sdStatus' was not declared in this scope

if(sdStatus || doStatus || saStatus){

^

bomba_0_0:242: error: 'doStatus' was not declared in this scope

if(sdStatus || doStatus || saStatus){

^

bomba_0_0:242: error: 'saStatus' was not declared in this scope

if(sdStatus || doStatus || saStatus){

^

bomba_0_0:246: error: 'lcd' was not declared in this scope

lcd.print(ARM_TIME);

^

bomba_0_0:246: error: 'ARM_TIME' was not declared in this scope

lcd.print(ARM_TIME);

^

bomba_0_0:249: error: 'ZERO_SECS' was not declared in this scope

lcd.print(ZERO_SECS);

^

bomba_0_0:257: error: 'time' was not declared in this scope

time[i] = varu;

^

bomba_0_0:259: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:272: error: 'var' was not declared in this scope

var = keypad.waitForKey();

^

bomba_0_0:272: error: 'keypad' was not declared in this scope

var = keypad.waitForKey();

^

bomba_0_0:275: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:276: error: 'ACTIVATESECONDS' was not declared in this scope

ACTIVATESECONDS= ((time[0]*10)+(time[1]));

^

bomba_0_0:276: error: 'time' was not declared in this scope

ACTIVATESECONDS= ((time[0]*10)+(time[1]));

^

bomba_0_0:281: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:285: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:289: error: 'sdStatus' was not declared in this scope

if(sdStatus || saStatus || doStatus){

^

bomba_0_0:289: error: 'saStatus' was not declared in this scope

if(sdStatus || saStatus || doStatus){

^

bomba_0_0:289: error: 'doStatus' was not declared in this scope

if(sdStatus || saStatus || doStatus){

^

bomba_0_0:291: error: 'lcd' was not declared in this scope

lcd.print(ENABLE_SOUND);

^

bomba_0_0:291: error: 'ENABLE_SOUND' was not declared in this scope

lcd.print(ENABLE_SOUND);

^

bomba_0_0:293: error: 'YES_OR_NOT' was not declared in this scope

lcd.print(YES_OR_NOT);

^

bomba_0_0:297: error: 'var' was not declared in this scope

var = keypad.waitForKey();

^

bomba_0_0:297: error: 'keypad' was not declared in this scope

var = keypad.waitForKey();

^

bomba_0_0:299: error: 'soundEnable' was not declared in this scope

soundEnable=true;

^

bomba_0_0:300: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:305: error: 'soundEnable' was not declared in this scope

soundEnable=false;

^

bomba_0_0:306: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:313: error: 'sdStatus' was not declared in this scope

if(sdStatus || saStatus){

^

bomba_0_0:313: error: 'saStatus' was not declared in this scope

if(sdStatus || saStatus){

^

bomba_0_0:315: error: 'lcd' was not declared in this scope

lcd.print(ENABLE_RELAYPIN);

^

bomba_0_0:315: error: 'ENABLE_RELAYPIN' was not declared in this scope

lcd.print(ENABLE_RELAYPIN);

^

bomba_0_0:317: error: 'YES_OR_NOT' was not declared in this scope

lcd.print(YES_OR_NOT);

^

bomba_0_0:320: error: 'var' was not declared in this scope

var = keypad.waitForKey();

^

bomba_0_0:320: error: 'keypad' was not declared in this scope

var = keypad.waitForKey();

^

bomba_0_0:322: error: 'relayEnable' was not declared in this scope

relayEnable=true;

^

bomba_0_0:323: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:327: error: 'relayEnable' was not declared in this scope

relayEnable=false;

^

bomba_0_0:328: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:334: error: 'sdStatus' was not declared in this scope

if(sdStatus || saStatus){

^

bomba_0_0:334: error: 'saStatus' was not declared in this scope

if(sdStatus || saStatus){

^

bomba_0_0:336: error: 'lcd' was not declared in this scope

lcd.print(ENABLE_CODE);

^

bomba_0_0:336: error: 'ENABLE_CODE' was not declared in this scope

lcd.print(ENABLE_CODE);

^

bomba_0_0:338: error: 'YES_OR_NOT' was not declared in this scope

lcd.print(YES_OR_NOT);

^

bomba_0_0:342: error: 'var' was not declared in this scope

var = keypad.waitForKey();

^

bomba_0_0:342: error: 'keypad' was not declared in this scope

var = keypad.waitForKey();

^

bomba_0_0:344: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:346: error: 'passwordEnable' was not declared in this scope

passwordEnable = true;

^

bomba_0_0:350: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

bomba_0_0:351: error: 'passwordEnable' was not declared in this scope

passwordEnable = false;

^

bomba_0_0:355: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\domination.ino: In function 'void domination()':

domination:4: error: 'GAMEMINUTES' was not declared in this scope

int minutos = GAMEMINUTES-1;

^

domination:10: error: 'team' was not declared in this scope

team=0;

^

domination:11: error: 'iZoneTime' was not declared in this scope

iZoneTime=0;

^

domination:13: error: 'redTime' was not declared in this scope

redTime=0;

^

domination:14: error: 'greenTime' was not declared in this scope

greenTime=0;

^

domination:22: error: 'endGame' was not declared in this scope

if(endGame){

^

domination:26: error: 'keypad' was not declared in this scope

keypad.getKey();

^

domination:29: error: 'timeCalcVar' was not declared in this scope

timeCalcVar=(millis()- iTime)%1000;

^

domination:32: error: 'GREENLED' was not declared in this scope

if(team==1)digitalWrite(GREENLED, HIGH);

^

domination:33: error: 'REDLED' was not declared in this scope

if(team==2)digitalWrite(REDLED, HIGH);

^

domination:37: error: 'GREENLED' was not declared in this scope

if(team==1)digitalWrite(GREENLED, LOW);

^

domination:38: error: 'REDLED' was not declared in this scope

if(team==2)digitalWrite(REDLED, LOW);

^

domination:41: error: 'soundEnable' was not declared in this scope

if(timeCalcVar >= 0 && timeCalcVar <= 40 && soundEnable)tone(tonepin,activeTone,largoTono);

^

domination:41: error: 'tonepin' was not declared in this scope

if(timeCalcVar >= 0 && timeCalcVar <= 40 && soundEnable)tone(tonepin,activeTone,largoTono);

^

domination:41: error: 'activeTone' was not declared in this scope

if(timeCalcVar >= 0 && timeCalcVar <= 40 && soundEnable)tone(tonepin,activeTone,largoTono);

^

domination:43: error: 'soundEnable' was not declared in this scope

if(timeCalcVar >= 245 && timeCalcVar <= 255 && minutos-aTime/60000<2 && soundEnable)tone(tonepin,activeTone,largoTono);

^

domination:43: error: 'tonepin' was not declared in this scope

if(timeCalcVar >= 245 && timeCalcVar <= 255 && minutos-aTime/60000<2 && soundEnable)tone(tonepin,activeTone,largoTono);

^

domination:43: error: 'activeTone' was not declared in this scope

if(timeCalcVar >= 245 && timeCalcVar <= 255 && minutos-aTime/60000<2 && soundEnable)tone(tonepin,activeTone,largoTono);

^

domination:44: error: 'soundEnable' was not declared in this scope

if(timeCalcVar >= 495 && timeCalcVar <= 510 && minutos-aTime/60000<4 && soundEnable)tone(tonepin,activeTone,largoTono);

^

domination:44: error: 'tonepin' was not declared in this scope

if(timeCalcVar >= 495 && timeCalcVar <= 510 && minutos-aTime/60000<4 && soundEnable)tone(tonepin,activeTone,largoTono);

^

domination:44: error: 'activeTone' was not declared in this scope

if(timeCalcVar >= 495 && timeCalcVar <= 510 && minutos-aTime/60000<4 && soundEnable)tone(tonepin,activeTone,largoTono);

^

domination:45: error: 'soundEnable' was not declared in this scope

if(timeCalcVar >= 745 && timeCalcVar <= 760 && minutos-aTime/60000<2 && soundEnable)tone(tonepin,activeTone,largoTono);

^

domination:45: error: 'tonepin' was not declared in this scope

if(timeCalcVar >= 745 && timeCalcVar <= 760 && minutos-aTime/60000<2 && soundEnable)tone(tonepin,activeTone,largoTono);

^

domination:45: error: 'activeTone' was not declared in this scope

if(timeCalcVar >= 745 && timeCalcVar <= 760 && minutos-aTime/60000<2 && soundEnable)tone(tonepin,activeTone,largoTono);

^

domination:55: error: 'lcd' was not declared in this scope

lcd.setCursor(3,0);

^

domination:62: error: 'lcd' was not declared in this scope

lcd.setCursor(2,0);

^

domination:82: error: 'defusing' was not declared in this scope

while((defusing || cancelando) && team > 0)

^

domination:82: error: 'cancelando' was not declared in this scope

while((defusing || cancelando) && team > 0)

^

domination:85: error: 'lcd' was not declared in this scope

if(team>0)lcd.print("NEUTRALIZING...");

^

domination:86: error: 'lcd' was not declared in this scope

lcd.setCursor(0,1);

^

domination:94: error: 'endGame' was not declared in this scope

endGame = true;

^

domination:102: error: 'soundEnable' was not declared in this scope

if(soundEnable)tone(tonepin,alarmTone1,200);

^

domination:102: error: 'tonepin' was not declared in this scope

if(soundEnable)tone(tonepin,alarmTone1,200);

^

domination:102: error: 'alarmTone1' was not declared in this scope

if(soundEnable)tone(tonepin,alarmTone1,200);

^

domination:106: error: 'soundEnable' was not declared in this scope

if(soundEnable)tone(tonepin,alarmTone2,200);

^

domination:106: error: 'tonepin' was not declared in this scope

if(soundEnable)tone(tonepin,alarmTone2,200);

^

domination:106: error: 'alarmTone2' was not declared in this scope

if(soundEnable)tone(tonepin,alarmTone2,200);

^

domination:107: error: 'REDLED' was not declared in this scope

digitalWrite(REDLED, LOW);

^

domination:111: error: 'ACTIVATESECONDS' was not declared in this scope

percent = (seconds)/(ACTIVATESECONDS*10);

^

domination:136: error: 'defusing' was not declared in this scope

while(defusing && team == 0 )

^

domination:139: error: 'lcd' was not declared in this scope

if(team==0)lcd.print(" CAPTURING ZONE");

^

domination:140: error: 'lcd' was not declared in this scope

lcd.setCursor(0,1);

^

domination:149: error: 'endGame' was not declared in this scope

endGame = true;

^

domination:155: error: 'REDLED' was not declared in this scope

digitalWrite(REDLED, HIGH);

^

domination:156: error: 'soundEnable' was not declared in this scope

if(soundEnable)tone(tonepin,alarmTone1,200);

^

domination:156: error: 'tonepin' was not declared in this scope

if(soundEnable)tone(tonepin,alarmTone1,200);

^

domination:156: error: 'alarmTone1' was not declared in this scope

if(soundEnable)tone(tonepin,alarmTone1,200);

^

domination:160: error: 'soundEnable' was not declared in this scope

if(soundEnable)tone(tonepin,alarmTone2,200);

^

domination:160: error: 'tonepin' was not declared in this scope

if(soundEnable)tone(tonepin,alarmTone2,200);

^

domination:160: error: 'alarmTone2' was not declared in this scope

if(soundEnable)tone(tonepin,alarmTone2,200);

^

domination:161: error: 'REDLED' was not declared in this scope

digitalWrite(REDLED, LOW);

^

domination:165: error: 'ACTIVATESECONDS' was not declared in this scope

percent = (seconds)/(ACTIVATESECONDS*10);

^

domination:170: error: 'GREENLED' was not declared in this scope

digitalWrite(GREENLED, LOW);

^

domination:178: error: 'REDLED' was not declared in this scope

digitalWrite(REDLED, LOW);

^

domination:182: error: 'cancelando' was not declared in this scope

while(cancelando && team == 0 )

^

domination:185: error: 'lcd' was not declared in this scope

if(team==0)lcd.print(" CAPTURING ZONE");

^

domination:186: error: 'lcd' was not declared in this scope

lcd.setCursor(0,1);

^

domination:195: error: 'endGame' was not declared in this scope

endGame = true;

^

domination:201: error: 'GREENLED' was not declared in this scope

digitalWrite(GREENLED, HIGH);

^

domination:202: error: 'soundEnable' was not declared in this scope

if(soundEnable)tone(tonepin,alarmTone1,200);

^

domination:202: error: 'tonepin' was not declared in this scope

if(soundEnable)tone(tonepin,alarmTone1,200);

^

domination:202: error: 'alarmTone1' was not declared in this scope

if(soundEnable)tone(tonepin,alarmTone1,200);

^

domination:206: error: 'soundEnable' was not declared in this scope

if(soundEnable)tone(tonepin,alarmTone2,200);

^

domination:206: error: 'tonepin' was not declared in this scope

if(soundEnable)tone(tonepin,alarmTone2,200);

^

domination:206: error: 'alarmTone2' was not declared in this scope

if(soundEnable)tone(tonepin,alarmTone2,200);

^

domination:207: error: 'GREENLED' was not declared in this scope

digitalWrite(GREENLED, LOW);

^

domination:211: error: 'ACTIVATESECONDS' was not declared in this scope

percent = (seconds)/(ACTIVATESECONDS*10);

^

domination:216: error: 'GREENLED' was not declared in this scope

digitalWrite(GREENLED, LOW);

^

domination:224: error: 'GREENLED' was not declared in this scope

digitalWrite(GREENLED, LOW);

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\domination.ino: In function 'void gameOver()':

domination:231: error: 'team' was not declared in this scope

if(team==1)greenTime+=millis()-iZoneTime;

^

domination:231: error: 'greenTime' was not declared in this scope

if(team==1)greenTime+=millis()-iZoneTime;

^

domination:231: error: 'iZoneTime' was not declared in this scope

if(team==1)greenTime+=millis()-iZoneTime;

^

domination:232: error: 'team' was not declared in this scope

if(team==2)redTime+=millis()-iZoneTime;

^

domination:232: error: 'redTime' was not declared in this scope

if(team==2)redTime+=millis()-iZoneTime;

^

domination:232: error: 'iZoneTime' was not declared in this scope

if(team==2)redTime+=millis()-iZoneTime;

^

domination:233: error: 'GREENLED' was not declared in this scope

digitalWrite(GREENLED, LOW);

^

domination:234: error: 'REDLED' was not declared in this scope

digitalWrite(REDLED, LOW);

^

domination:235: error: 'defusing' was not declared in this scope

while(!defusing){

^

domination:236: error: 'keypad' was not declared in this scope

keypad.getKey();

^

domination:241: error: 'lcd' was not declared in this scope

lcd.clear();

^

domination:247: error: 'greenTime' was not declared in this scope

if(greenTime>redTime){

^

domination:247: error: 'redTime' was not declared in this scope

if(greenTime>redTime){

^

domination:266: error: 'redTime' was not declared in this scope

printTimeDom(redTime,false);

^

domination:276: error: 'greenTime' was not declared in this scope

printTimeDom(greenTime,false);

^

domination:286: error: 'lcd' was not declared in this scope

lcd.print("Play Again?");

^

domination:291: error: 'var' was not declared in this scope

var = keypad.waitForKey();

^

domination:291: error: 'keypad' was not declared in this scope

var = keypad.waitForKey();

^

domination:293: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

domination:299: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\key.ino: In function 'boolean comparePassword()':

key:5: error: 'codeInput' was not declared in this scope

if(codeInput[i]!=password[i])return false;

^

key:5: error: 'password' was not declared in this scope

if(codeInput[i]!=password[i])return false;

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\key.ino: In function 'void setCode()':

key:13: error: 'lcd' was not declared in this scope

lcd.setCursor(0, 1);

^

key:16: error: 'var' was not declared in this scope

var= getNumber();

^

key:18: error: 'codeInput' was not declared in this scope

codeInput[i] = var;

^

key:29: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\key.ino: In function 'void setCodeTime()':

key:37: error: 'timeCalcVar' was not declared in this scope

timeCalcVar=millis();

^

key:41: error: 'ACTIVATESECONDS' was not declared in this scope

if(ACTIVATESECONDS*1000+timeCalcVar-millis()<=100){

^

key:42: error: 'codeInput' was not declared in this scope

codeInput[i]='x';

^

key:46: error: 'lcd' was not declared in this scope

lcd.setCursor(11,0);

^

key:47: error: 'ACTIVATESECONDS' was not declared in this scope

printTimeDom(ACTIVATESECONDS*1000+timeCalcVar-millis(),false);

^

key:49: error: 'var' was not declared in this scope

var= getNumber();

^

key:51: error: 'codeInput' was not declared in this scope

codeInput[i] = var;

^

key:62: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\key.ino: In function 'void setPass()':

key:69: error: 'lcd' was not declared in this scope

lcd.setCursor(0, 1);

^

key:73: error: 'var' was not declared in this scope

var= getNumber();

^

key:75: error: 'password' was not declared in this scope

password[i] = var;

^

key:85: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\key.ino: In function 'void setNewPass()':

key:95: error: 'lcd' was not declared in this scope

lcd.clear();

^

key:118: error: 'soundEnable' was not declared in this scope

if(soundEnable)tone(tonepin,errorTone,200);

^

key:118: error: 'tonepin' was not declared in this scope

if(soundEnable)tone(tonepin,errorTone,200);

^

key:118: error: 'errorTone' was not declared in this scope

if(soundEnable)tone(tonepin,errorTone,200);

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\key.ino: In function 'char getNumber()':

key:130: error: 'var' was not declared in this scope

var = keypad.getKey();

^

key:130: error: 'keypad' was not declared in this scope

var = keypad.getKey();

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\key.ino: In function 'byte getRealNumber()':

key:164: error: 'var' was not declared in this scope

var = keypad.waitForKey();

^

key:164: error: 'keypad' was not declared in this scope

var = keypad.waitForKey();

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino: At global scope:

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:1:80: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* menu1[]={"Search&Destroy","Sabotage","Domination", "Configuration" };

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:1:80: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:1:80: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:1:80: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:2:79: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* menu2[]={"Game Config","Sound Config", "Relay Test", "Auto Test" };

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:2:79: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:2:79: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:2:79: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:3:19: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* GAME_TIME="Game Time:";

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:4:19: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* BOMB_TIME="Bomb Time:";

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:5:22: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* ZERO_MINUTES="00 minutes";

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:6:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* ARM_TIME="Arm Time:";

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:7:19: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* ZERO_SECS="00 seconds";

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:8:22: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* ENABLE_SOUND="Enable Sound?";

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:9:20: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* YES_OR_NOT="A : Yes B : No";

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:10:25: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* ENABLE_RELAYPIN="Enable Relay?";

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:11:21: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* ENABLE_CODE="Enable Code Arm?";

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:12:23: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* GAME_TIME_TOP="GAME TIME";

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:13:23: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* ARMING_BOMB = "ARMING BOMB";

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:14:22: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* ENTER_CODE = "Enter Code";

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:15:22: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* CODE_ERROR = "Code Error!";

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:16:22: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* BOMB_ARMED = "BOMB ARMED";

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:17:25: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* DETONATION_IN = "DETONATION IN";

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:18:21: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* DISARMING = "DISARMING BOMB" ;

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:19:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* DISARM = "DISARMING";

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:20:21: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* GAME_OVER = " GAME OVER! ";

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:21:25: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* DEFENDERS_WIN = " DEFENDERS WIN ";

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\lang.ino:22:24: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* SABOTAGE_FAIL= "SABOTAGE FAIL!";

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\sabotage.ino: In function 'void sabotage()':

sabotage:2: error: 'endGame' was not declared in this scope

endGame = false;

^

sabotage:3: error: 'refresh' was not declared in this scope

refresh = true;

^

sabotage:5: error: 'REDLED' was not declared in this scope

digitalWrite(REDLED, LOW);

^

sabotage:6: error: 'GREENLED' was not declared in this scope

digitalWrite(GREENLED, LOW);

^

sabotage:8: error: 'GAMEMINUTES' was not declared in this scope

int minutos = GAMEMINUTES - 1;

^

sabotage:11: error: 'start' was not declared in this scope

if (start) {

^

sabotage:12: error: 'iTime' was not declared in this scope

iTime = millis(); // initialTime of the game, use this because sabotage mode goes can return to sabotage()

^

sabotage:25: error: 'timeCalcVar' was not declared in this scope

timeCalcVar = (millis() - iTime) % 1000;

^

sabotage:25: error: 'iTime' was not declared in this scope

timeCalcVar = (millis() - iTime) % 1000;

^

sabotage:29: error: 'lcd' was not declared in this scope

lcd.setCursor(3, 0);

^

sabotage:44: error: 'keypad' was not declared in this scope

if ('d' == keypad.getKey() && passwordEnable) {

^

sabotage:44: error: 'passwordEnable' was not declared in this scope

if ('d' == keypad.getKey() && passwordEnable) {

^

sabotage:63: error: 'soundEnable' was not declared in this scope

if (soundEnable)tone(tonepin, errorTone, 200);

^

sabotage:63: error: 'tonepin' was not declared in this scope

if (soundEnable)tone(tonepin, errorTone, 200);

^

sabotage:63: error: 'errorTone' was not declared in this scope

if (soundEnable)tone(tonepin, errorTone, 200);

^

sabotage:69: error: 'defusing' was not declared in this scope

while (defusing && !passwordEnable)

^

sabotage:69: error: 'passwordEnable' was not declared in this scope

while (defusing && !passwordEnable)

^

sabotage:71: error: 'keypad' was not declared in this scope

keypad.getKey();

^

sabotage:92: error: 'soundEnable' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone1, 200);

^

sabotage:92: error: 'tonepin' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone1, 200);

^

sabotage:92: error: 'alarmTone1' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone1, 200);

^

sabotage:96: error: 'soundEnable' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone2, 200);

^

sabotage:96: error: 'tonepin' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone2, 200);

^

sabotage:96: error: 'alarmTone2' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone2, 200);

^

sabotage:100: error: 'ACTIVATESECONDS' was not declared in this scope

percent = (seconds) / (ACTIVATESECONDS * 10);

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\sabotage.ino: In function 'void destroySabotage()':

sabotage:116: error: 'endGame' was not declared in this scope

endGame = false;

^

sabotage:117: error: 'lcd' was not declared in this scope

lcd.clear();

^

sabotage:121: error: 'BOMBMINUTES' was not declared in this scope

int minutos = BOMBMINUTES - 1;

^

sabotage:136: error: 'timeCalcVar' was not declared in this scope

timeCalcVar = (millis() - iTime) % 1000;

^

sabotage:139: error: 'REDLED' was not declared in this scope

digitalWrite(REDLED, HIGH);

^

sabotage:140: error: 'soundEnable' was not declared in this scope

if (soundEnable)tone(tonepin, activeTone, largoTono);

^

sabotage:140: error: 'tonepin' was not declared in this scope

if (soundEnable)tone(tonepin, activeTone, largoTono);

^

sabotage:140: error: 'activeTone' was not declared in this scope

if (soundEnable)tone(tonepin, activeTone, largoTono);

^

sabotage:143: error: 'REDLED' was not declared in this scope

digitalWrite(REDLED, LOW);

^

sabotage:149: error: 'soundEnable' was not declared in this scope

if (timeCalcVar >= 245 && timeCalcVar <= 255 && minutos - aTime / 60000 < 2 && soundEnable)tone(tonepin, activeTone, largoTono);

^

sabotage:149: error: 'tonepin' was not declared in this scope

if (timeCalcVar >= 245 && timeCalcVar <= 255 && minutos - aTime / 60000 < 2 && soundEnable)tone(tonepin, activeTone, largoTono);

^

sabotage:149: error: 'activeTone' was not declared in this scope

if (timeCalcVar >= 245 && timeCalcVar <= 255 && minutos - aTime / 60000 < 2 && soundEnable)tone(tonepin, activeTone, largoTono);

^

sabotage:150: error: 'soundEnable' was not declared in this scope

if (timeCalcVar >= 495 && timeCalcVar <= 510 && minutos - aTime / 60000 < 4 && soundEnable)tone(tonepin, activeTone, largoTono);

^

sabotage:150: error: 'tonepin' was not declared in this scope

if (timeCalcVar >= 495 && timeCalcVar <= 510 && minutos - aTime / 60000 < 4 && soundEnable)tone(tonepin, activeTone, largoTono);

^

sabotage:150: error: 'activeTone' was not declared in this scope

if (timeCalcVar >= 495 && timeCalcVar <= 510 && minutos - aTime / 60000 < 4 && soundEnable)tone(tonepin, activeTone, largoTono);

^

sabotage:151: error: 'soundEnable' was not declared in this scope

if (timeCalcVar >= 745 && timeCalcVar <= 760 && minutos - aTime / 60000 < 2 && soundEnable)tone(tonepin, activeTone, largoTono);

^

sabotage:151: error: 'tonepin' was not declared in this scope

if (timeCalcVar >= 745 && timeCalcVar <= 760 && minutos - aTime / 60000 < 2 && soundEnable)tone(tonepin, activeTone, largoTono);

^

sabotage:151: error: 'activeTone' was not declared in this scope

if (timeCalcVar >= 745 && timeCalcVar <= 760 && minutos - aTime / 60000 < 2 && soundEnable)tone(tonepin, activeTone, largoTono);

^

sabotage:174: error: 'keypad' was not declared in this scope

if ('d' == keypad.getKey() && passwordEnable) {

^

sabotage:174: error: 'passwordEnable' was not declared in this scope

if ('d' == keypad.getKey() && passwordEnable) {

^

sabotage:177: error: 'REDLED' was not declared in this scope

digitalWrite(REDLED, LOW);

^

sabotage:178: error: 'GREENLED' was not declared in this scope

digitalWrite(GREENLED, HIGH);

^

sabotage:196: error: 'soundEnable' was not declared in this scope

if (soundEnable)tone(tonepin, errorTone, 200);

^

sabotage:196: error: 'tonepin' was not declared in this scope

if (soundEnable)tone(tonepin, errorTone, 200);

^

sabotage:196: error: 'errorTone' was not declared in this scope

if (soundEnable)tone(tonepin, errorTone, 200);

^

sabotage:201: error: 'defusing' was not declared in this scope

if (defusing && !passwordEnable) // disarming bomb

^

sabotage:201: error: 'passwordEnable' was not declared in this scope

if (defusing && !passwordEnable) // disarming bomb

^

sabotage:204: error: 'REDLED' was not declared in this scope

digitalWrite(REDLED, LOW);

^

sabotage:212: error: 'keypad' was not declared in this scope

keypad.getKey();

^

sabotage:222: error: 'GREENLED' was not declared in this scope

digitalWrite(GREENLED, HIGH);

^

sabotage:223: error: 'soundEnable' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone1, 200);

^

sabotage:223: error: 'tonepin' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone1, 200);

^

sabotage:223: error: 'alarmTone1' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone1, 200);

^

sabotage:227: error: 'soundEnable' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone2, 200);

^

sabotage:227: error: 'tonepin' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone2, 200);

^

sabotage:227: error: 'alarmTone2' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone2, 200);

^

sabotage:228: error: 'GREENLED' was not declared in this scope

digitalWrite(GREENLED, LOW);

^

sabotage:231: error: 'ACTIVATESECONDS' was not declared in this scope

percent = seconds / (ACTIVATESECONDS * 10);

^

sabotage:244: error: 'GREENLED' was not declared in this scope

digitalWrite(GREENLED, LOW);

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\searchdestroy.ino: In function 'void search()':

searchdestroy:2: error: 'refresh' was not declared in this scope

refresh = true;

^

searchdestroy:4: error: 'REDLED' was not declared in this scope

digitalWrite(REDLED, LOW);

^

searchdestroy:5: error: 'GREENLED' was not declared in this scope

digitalWrite(GREENLED, LOW);

^

searchdestroy:7: error: 'GAMEMINUTES' was not declared in this scope

int minutos = GAMEMINUTES - 1;

^

searchdestroy:16: error: 'endGame' was not declared in this scope

if (endGame) {

^

searchdestroy:21: error: 'timeCalcVar' was not declared in this scope

timeCalcVar = (millis() - iTime) % 1000;

^

searchdestroy:25: error: 'lcd' was not declared in this scope

lcd.setCursor(3, 0);

^

searchdestroy:40: error: 'keypad' was not declared in this scope

if ('d' == keypad.getKey() && passwordEnable) {

^

searchdestroy:40: error: 'passwordEnable' was not declared in this scope

if ('d' == keypad.getKey() && passwordEnable) {

^

searchdestroy:57: error: 'soundEnable' was not declared in this scope

if (soundEnable)tone(tonepin, errorTone, 200);

^

searchdestroy:57: error: 'tonepin' was not declared in this scope

if (soundEnable)tone(tonepin, errorTone, 200);

^

searchdestroy:57: error: 'errorTone' was not declared in this scope

if (soundEnable)tone(tonepin, errorTone, 200);

^

searchdestroy:62: error: 'defusing' was not declared in this scope

while (defusing && !passwordEnable)

^

searchdestroy:62: error: 'passwordEnable' was not declared in this scope

while (defusing && !passwordEnable)

^

searchdestroy:73: error: 'keypad' was not declared in this scope

keypad.getKey();

^

searchdestroy:74: error: 'ACTIVATESECONDS' was not declared in this scope

percent = (millis() - xTime) / (ACTIVATESECONDS * 10);

^

searchdestroy:81: error: 'endGame' was not declared in this scope

endGame = true;

^

searchdestroy:88: error: 'soundEnable' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone1, 200);

^

searchdestroy:88: error: 'tonepin' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone1, 200);

^

searchdestroy:88: error: 'alarmTone1' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone1, 200);

^

searchdestroy:92: error: 'soundEnable' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone2, 200);

^

searchdestroy:92: error: 'tonepin' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone2, 200);

^

searchdestroy:92: error: 'alarmTone2' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone2, 200);

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\searchdestroy.ino: In function 'void destroy()':

searchdestroy:112: error: 'lcd' was not declared in this scope

lcd.clear();

^

searchdestroy:116: error: 'BOMBMINUTES' was not declared in this scope

int minutos = BOMBMINUTES - 1;

^

searchdestroy:125: error: 'endGame' was not declared in this scope

if (endGame) {

^

searchdestroy:131: error: 'timeCalcVar' was not declared in this scope

timeCalcVar = (millis() - iTime) % 1000;

^

searchdestroy:134: error: 'REDLED' was not declared in this scope

digitalWrite(REDLED, HIGH);

^

searchdestroy:135: error: 'soundEnable' was not declared in this scope

if (soundEnable)tone(tonepin, activeTone, largoTono);

^

searchdestroy:135: error: 'tonepin' was not declared in this scope

if (soundEnable)tone(tonepin, activeTone, largoTono);

^

searchdestroy:135: error: 'activeTone' was not declared in this scope

if (soundEnable)tone(tonepin, activeTone, largoTono);

^

searchdestroy:138: error: 'REDLED' was not declared in this scope

digitalWrite(REDLED, LOW);

^

searchdestroy:143: error: 'soundEnable' was not declared in this scope

if (timeCalcVar >= 245 && timeCalcVar <= 255 && minutos - aTime / 60000 < 2 && soundEnable)tone(tonepin, activeTone, largoTono);

^

searchdestroy:143: error: 'tonepin' was not declared in this scope

if (timeCalcVar >= 245 && timeCalcVar <= 255 && minutos - aTime / 60000 < 2 && soundEnable)tone(tonepin, activeTone, largoTono);

^

searchdestroy:143: error: 'activeTone' was not declared in this scope

if (timeCalcVar >= 245 && timeCalcVar <= 255 && minutos - aTime / 60000 < 2 && soundEnable)tone(tonepin, activeTone, largoTono);

^

searchdestroy:144: error: 'soundEnable' was not declared in this scope

if (timeCalcVar >= 495 && timeCalcVar <= 510 && minutos - aTime / 60000 < 4 && soundEnable)tone(tonepin, activeTone, largoTono);

^

searchdestroy:144: error: 'tonepin' was not declared in this scope

if (timeCalcVar >= 495 && timeCalcVar <= 510 && minutos - aTime / 60000 < 4 && soundEnable)tone(tonepin, activeTone, largoTono);

^

searchdestroy:144: error: 'activeTone' was not declared in this scope

if (timeCalcVar >= 495 && timeCalcVar <= 510 && minutos - aTime / 60000 < 4 && soundEnable)tone(tonepin, activeTone, largoTono);

^

searchdestroy:145: error: 'soundEnable' was not declared in this scope

if (timeCalcVar >= 745 && timeCalcVar <= 760 && minutos - aTime / 60000 < 2 && soundEnable)tone(tonepin, activeTone, largoTono);

^

searchdestroy:145: error: 'tonepin' was not declared in this scope

if (timeCalcVar >= 745 && timeCalcVar <= 760 && minutos - aTime / 60000 < 2 && soundEnable)tone(tonepin, activeTone, largoTono);

^

searchdestroy:145: error: 'activeTone' was not declared in this scope

if (timeCalcVar >= 745 && timeCalcVar <= 760 && minutos - aTime / 60000 < 2 && soundEnable)tone(tonepin, activeTone, largoTono);

^

searchdestroy:169: error: 'keypad' was not declared in this scope

if ('d' == keypad.getKey() && passwordEnable) {

^

searchdestroy:169: error: 'passwordEnable' was not declared in this scope

if ('d' == keypad.getKey() && passwordEnable) {

^

searchdestroy:190: error: 'soundEnable' was not declared in this scope

if (soundEnable)tone(tonepin, errorTone, 200);

^

searchdestroy:190: error: 'tonepin' was not declared in this scope

if (soundEnable)tone(tonepin, errorTone, 200);

^

searchdestroy:190: error: 'errorTone' was not declared in this scope

if (soundEnable)tone(tonepin, errorTone, 200);

^

searchdestroy:195: error: 'defusing' was not declared in this scope

if (defusing && !passwordEnable) // disarming bomb

^

searchdestroy:195: error: 'passwordEnable' was not declared in this scope

if (defusing && !passwordEnable) // disarming bomb

^

searchdestroy:198: error: 'REDLED' was not declared in this scope

digitalWrite(REDLED, LOW);

^

searchdestroy:206: error: 'keypad' was not declared in this scope

keypad.getKey();

^

searchdestroy:210: error: 'endGame' was not declared in this scope

endGame = true;

^

searchdestroy:215: error: 'GREENLED' was not declared in this scope

digitalWrite(GREENLED, HIGH);

^

searchdestroy:216: error: 'soundEnable' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone1, 200);

^

searchdestroy:216: error: 'tonepin' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone1, 200);

^

searchdestroy:216: error: 'alarmTone1' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone1, 200);

^

searchdestroy:220: error: 'soundEnable' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone2, 200);

^

searchdestroy:220: error: 'tonepin' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone2, 200);

^

searchdestroy:220: error: 'alarmTone2' was not declared in this scope

if (soundEnable)tone(tonepin, alarmTone2, 200);

^

searchdestroy:221: error: 'GREENLED' was not declared in this scope

digitalWrite(GREENLED, LOW);

^

searchdestroy:224: error: 'ACTIVATESECONDS' was not declared in this scope

percent = seconds / (ACTIVATESECONDS * 10);

^

searchdestroy:231: error: 'GREENLED' was not declared in this scope

digitalWrite(GREENLED, LOW);

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\splash.ino: In function 'void explodeSplash()':

splash:2: error: 'REDLED' was not declared in this scope

digitalWrite(REDLED, LOW);

^

splash:3: error: 'GREENLED' was not declared in this scope

digitalWrite(GREENLED, LOW);

^

splash:6: error: 'endGame' was not declared in this scope

endGame = false;

^

splash:7: error: 'lcd' was not declared in this scope

lcd.setCursor(1,0);

^

splash:13: error: 'tonepin' was not declared in this scope

tone(tonepin,i);

^

splash:16: error: 'tonepin' was not declared in this scope

noTone(tonepin);

^

splash:17: error: 'relayEnable' was not declared in this scope

if(relayEnable){

^

splash:29: error: 'var' was not declared in this scope

var = keypad.waitForKey();

^

splash:29: error: 'keypad' was not declared in this scope

var = keypad.waitForKey();

^

splash:33: error: 'sdStatus' was not declared in this scope

if(sdStatus){

^

splash:37: error: 'saStatus' was not declared in this scope

if(saStatus){

^

splash:40: error: 'start' was not declared in this scope

start=true; //to set iTime to actual millis() :D

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\splash.ino: In function 'void failSplash()':

splash:53: error: 'REDLED' was not declared in this scope

digitalWrite(REDLED, LOW);

^

splash:54: error: 'GREENLED' was not declared in this scope

digitalWrite(GREENLED, LOW);

^

splash:57: error: 'endGame' was not declared in this scope

endGame = false;

^

splash:58: error: 'lcd' was not declared in this scope

lcd.setCursor(1,0);

^

splash:64: error: 'tonepin' was not declared in this scope

tone(tonepin,i);

^

splash:67: error: 'tonepin' was not declared in this scope

noTone(tonepin);

^

splash:68: error: 'relayEnable' was not declared in this scope

if(relayEnable){

^

splash:80: error: 'var' was not declared in this scope

var = keypad.waitForKey();

^

splash:80: error: 'keypad' was not declared in this scope

var = keypad.waitForKey();

^

splash:84: error: 'sdStatus' was not declared in this scope

if(sdStatus){

^

splash:88: error: 'saStatus' was not declared in this scope

if(saStatus){

^

splash:91: error: 'start' was not declared in this scope

start=true; //to set iTime to actual millis() :D

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\splash.ino: In function 'void disarmedSplash()':

splash:104: error: 'endGame' was not declared in this scope

endGame = false;

^

splash:105: error: 'REDLED' was not declared in this scope

digitalWrite(REDLED, LOW);

^

splash:106: error: 'GREENLED' was not declared in this scope

digitalWrite(GREENLED, LOW);

^

splash:107: error: 'sdStatus' was not declared in this scope

if(sdStatus || saStatus){

^

splash:107: error: 'saStatus' was not declared in this scope

if(sdStatus || saStatus){

^

splash:108: error: 'lcd' was not declared in this scope

lcd.clear();

^

splash:118: error: 'lcd' was not declared in this scope

lcd.clear();

^

splash:126: error: 'var' was not declared in this scope

var = keypad.waitForKey();

^

splash:126: error: 'keypad' was not declared in this scope

var = keypad.waitForKey();

^

splash:128: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

splash:130: error: 'sdStatus' was not declared in this scope

if(sdStatus){

^

splash:134: error: 'saStatus' was not declared in this scope

if(saStatus){

^

splash:137: error: 'start' was not declared in this scope

start=true; //to set iTime to actual millis() :D

^

splash:142: error: 'tonepin' was not declared in this scope

tone(tonepin,2400,30);

^

C:\Users\glauc\Desktop\Arduino\Bomba teste\bomba_0_0\time_bomb.ino: In function 'void setup()':

time_bomb:108: error: 'keypadEvent' was not declared in this scope

keypad.addEventListener(keypadEvent);

^

exit status 1
variable or field 'keypadEvent' declared void

Can one at the fake bomb on the function that you can defuse them with different wires?
And could one make the whole also programmable, which the wire defuses the bomb or for example the timer run faster?

Help with the problem

Time_BOMB_Airsoft_GAME:197: error: 'menuPrincipal' was not declared in this scope

exit status 1

'menuPrincipal' was not declared in this scope

Hi, I know this is an old post but have am having a problem uploading the code keep getting the message

" 'menuprincipal' was not declaired in this scope "

Hope you can help as really look forward to making this.

Thank you

1 reply

hi, i have the same problem.

you know how we can do it without "menu principal"?

haveing problem this is what i get when trying to upload

Arduino: 1.6.12 (Windows 10), Board: "Arduino/Genuino Uno"

C:\Users\Airso\AppData\Local\Temp\Temp1_FYW1PMWILGVF3ZU (5).zip\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:2:20: fatal error: Keypad.h: No such file or directory

#include <Keypad.h>

^

compilation terminated.

exit status 1

1 reply

Hi, liked your project, I decided to put together a sketch beg perfectly display all shows, but DOES NOT OPERATE Keypad 4x4 connects all as in the picture, using arduino pro mini, then decided to try to arfuino nano, nothing has changed, kdaviatura not work at all, I tried different keypad.h library does not help anything, just tried a second keyboard (I have two) zero result, also tried to connect the resistance 10kom please help, what could be wrong?

Hi, liked your project, I decided to put together a sketch beg perfectly display all shows, but DOES NOT OPERATE Keypad 4x4 connects all as in the picture, using arduino pro mini, then decided to try to arfuino nano, nothing has changed, kdaviatura not work at all, I tried different keypad.h library does not help anything, just tried a second keyboard (I have two) zero result, also tried to connect the resistance 10kom please help, what could be wrong?

I have made it and it works perfect. but i want to ad a game where both teams had to arm the bomb with a password but have some one did this already??