ARDUINO AIRSOFT TIME BOMB GAME

32,990

39

110

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.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

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!

8 People Made This Project!

Recommendations

  • Trash to Treasure Contest

    Trash to Treasure Contest
  • Raspberry Pi Contest 2020

    Raspberry Pi Contest 2020
  • Wearables Contest

    Wearables Contest

110 Discussions

0
zkarol17
zkarol17

3 months ago on Step 1

how much would it all cost?

0
dsever
dsever

Reply 6 weeks ago

20 bucksish for the parts - the case

0
roiador121
roiador121

Question 6 months ago

How to do it with I2C LCD display?

0
roiador121
roiador121

6 months ago

How to do it with I2C LCD display?

0
coke2243
coke2243

Question 7 months ago

hola , me pone
Time_BOMB_Airsoft_GAME:195:18: error: 'KeypadEvent' was not declared in this scope
exit status 1
variable or field 'keypadEvent' declared void
que alguien me diga que hacer ¡¡¡

0
Sierraalpha777
Sierraalpha777

Tip 7 months ago

Copy the code from the link below into your project, if there are any issues, you need to download the library into your Arduino program: go to "Tools">"Manage Libraries..">, Then choose Type:"Arduino" and search or add the library file. The codes from the downloaded files did not work for me. but the link below did and has all the files in one. Hope this helps someone. God Bless
https://docs.google.com/document/d/1-ZFbdkeSKIO4E-EVUFFCxsgXKL7DRYx69XJ08xa7UTs/edit
0
SebastianG163
SebastianG163

Question 7 months ago

Hallo,

Ist es denn möglich bei dem Spielmodus domination 2 weitere Teams hinzuzufügen. Also sprich statt 2 teams insgesamt 4 zu haben.
Ich habe mir den Code genau angesehen, aber leider reichen meine programmierkenntnisse dafür nicht aus. Danke

0
MichaelA598
MichaelA598

Question 9 months ago

I'm getting the 'menuPrincipal' was not declared in this scope error as well. I downloaded all the files and have the libraries. How do I fix this??

Arduino: 1.8.8 (Windows 10), Board: "Arduino Mega ADK"
C:\Users\micha\Desktop\DES 560\Bomb Game\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino: In function 'void loop()':
Time_BOMB_Airsoft_GAME:194:17: error: 'menuPrincipal' was not declared in this scope
menuPrincipal(){
^
Time_BOMB_Airsoft_GAME:263:14: error: a function-definition is not allowed here before '{' token
void config(){
^
Time_BOMB_Airsoft_GAME:572:1: error: expected '}' at end of input
}
^
exit status 1
'menuPrincipal' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

0
ColinS111
ColinS111

Question 10 months ago

With keypad libarie do i have to download? i cant find it... can someone help me (adafruit or something else?) I got the 4x4 keypad.. hope to hear from ya soon!

Keypad not found 2.PNG
0
gmayrhofer fonseca
gmayrhofer fonseca

Question 10 months ago

Does anyone know why this error messages??

C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:17:79: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* menu1[]={"Search&Destroy","Sabotage","Domination", "Configuration" };
^
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:17:79: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:17:79: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:17:79: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:18:79: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* menu2[]={"Game Config","Sound Config", "Relay Test", "Auto Test" };
^
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:18:79: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:18:79: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:18:79: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:19:19: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* GAME_TIME="Game Time:";
^
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:20:19: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* BOMB_TIME="Bomb Time:";
^
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:21:22: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* ZERO_MINUTES="00 minutes";
^
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:22:18: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* ARM_TIME="Arm Time:";
^
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:23:19: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* ZERO_SECS="00 seconds";
^
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:24:22: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* ENABLE_SOUND="Enable Sound?";
^
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:25:20: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* YES_OR_NOT="A : Yes B : No";
^
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:26:25: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* ENABLE_RELAYPIN="Enable Relay?";
^
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:27:21: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* ENABLE_CODE="Enable Code Arm?";
^
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:28:23: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* GAME_TIME_TOP="GAME TIME";
^
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:29:23: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* ARMING_BOMB = "ARMING BOMB";
^
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:30:22: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* ENTER_CODE = "Enter Code";
^
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:31:22: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* CODE_ERROR = "Code Error!";
^
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:32:22: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* BOMB_ARMED = "BOMB ARMED";
^
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:33:25: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* DETONATION_IN = "DETONATION IN";
^
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:34:21: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* DISARMING = "DISARMING BOMB" ;
^
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:35:18: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* DISARM = "DISARMING";
^
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:36:21: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* GAME_OVER = " GAME OVER! ";
^
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:37:25: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* DEFENDERS_WIN = " DEFENDERS WIN ";
^
C:\Users\guima\Desktop\arduino airsoft bomb\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino:38:24: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* SABOTAGE_FAIL= "SABOTAGE FAIL!";
^
O sketch usa 20808 bytes (64%) de espaço de armazenamento para programas. O máximo são 32256 bytes.
Variáveis globais usam 1363 bytes (66%) de memória dinâmica, deixando 685 bytes para variáveis locais. O máximo são 2048 bytes.

0
Alexjcgdf
Alexjcgdf

Question 10 months ago

First of all: FANTASTIC TUTORIAL!!!! I have constructed my time bomb to play airsoft and absolutely EVERYBODY loves it, and I you that gave the instructions.
So, I found a flaw on the code that happens for the Sabbotage game type. I created a game of total time 4 hours with a bomb explosiong in 30 minutes. So you activate the bomb and had to hold the position for 30 minutes. the other team could go there and desactivate the bomb and goes on and on like that. The problem was when we activated the bomb on the last 5 minutes of the game. So the counter on that situation went to the bomb timer as expected. When the bomb was about to explode, the other team managed to invade with a granade (smart guys...) and were able to desactivate the bomb which should lead the game to be over considering that the game total time was already over. However, what appeared on the LCD was a bunch of numbers like 776577:99338:31, the bomb continued to blink and the game never ended. It looks like a bad division or something like that. Do you know what should be? have you ever the same situation? you can make a quick test: create a game of 1 minute with 1 minute bomb, when you start you wait 50 seconds and activate the bomb. After wait 30 seconds and desactivate the bomb. Suggestions?
Thanks one more time.
Alex Gomes

0
Alexjcgdf
Alexjcgdf

Tip 11 months ago on Introduction

sometimes the keyboard connector is mirrored. so the connections has to be done backwards.

0
WagnerR12
WagnerR12

2 years ago

nobody can share a code that works?

0
vandenbrande
vandenbrande

Reply 11 months ago

It works, your just doing something wrong. Try using arduino 1.6.6.

0
KonradK8
KonradK8

Question 1 year ago

Why i have this communicat what should I do change in code?

2018-05-05 (3).png
0
vandenbrande
vandenbrande

Reply 11 months ago

Wrong library

0
KonradK8
KonradK8

Question 1 year ago

WHAT'S wrong in this line of code?

0
vandenbrande
vandenbrande

Reply 11 months ago

which line?

0
AmmarF5
AmmarF5

Question 1 year ago

Arduino: 1.8.5 (Windows 7), Board: "Arduino/Genuino Uno"

C:\Users\........\AppData\Local\Temp\Rar$DIa0.657\Time_BOMB_Airsoft_GAME\Time_BOMB_Airsoft_GAME.ino: In function 'void loop()':

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

menuPrincipal();

^

exit status 1

'menuPrincipal' was not declared in this scope

This report would have more information with

"Show verbose output during compilation"

option enabled in File -> Preferences.

0
vandenbrande
vandenbrande

Reply 11 months ago

Think you did something wrong there.