Milsim Airsoft Project

I was looking around for ideas on how to make this project, and the Arduino caught my eye. Not sure if it can be used in the way I want it to or not.

I'm looking to build a "bomb" prop for a scenario that is based on the "Counter-Strike" video game. When the timer runs out a very loud buzzer is set off. Here's what I need it to do:

-One team, the "bad guys", start with this bomb, they take it to a designated site and punch in the correct key code. (I was thinking about using the 12 button 3 X 4 keypad from sparkfun)

-A count down timer (probably 15 minutes) is then shown on the display. (I was looking at the 16 x 2 serial enabled LCDs from sparkfun).

-The other team has to reach the bomb, punch in a code (can be the same one) and then hold down a button for 60 seconds to disarm it.

-When the countdown reaches 0, the buzzer is tripped.

Other things that would be nice to have, but are not necessary:

-The first team has to plug in a jumper before the bomb can be activated (to prevent them from arming it before they get to the plant site)

-One person can plug in a jumper, or enter a code, that drops the disarm time to 15 seconds. (a defuse-kit, if you have played the game)

-Each number is shown on the lcd as it is entered.

Is this something that is possible with the arduino? I am fairly new to this field, so anything I should watch out for? Any tips for starting a project like this? Once I get the actual arduino kit i'll probably mess around with it for a while before actually attempting this. Thanks in advance.

Disclaimer:
We are on land owned by a group that knows what we are doing, the land is specifically for our airsofting purpose, before each game the land owners, local police, and state police are notified of our game. We usually have 2 law enforcement officers on site with us.

Should be fairly easy...

Take a look at the playground area for ideas and code samples.

http://www.arduino.cc/playground/

Here is the keypad tutorial
http://www.arduino.cc/playground/Main/KeypadTutorial

Let us know how it goes..

Doesn't sound too hard...

If you want to avoid the keypad, you could also do this: take a variable (turn) resistor and conect it to an analog input. It gives you 1024 values. So, devide this to match it to the number of characters you want to use (numbers, letters?) and there you have it. You can print the current value on lcd and use one button as "enter" to add the curent value into your string, which you will then compare to the original password.

Other things are up to you, how do you want it to work.

im currently working on a project than incorporates a serial lcd and buttons for inputs. the sparkfun lcd and keypad are good choices as they are easy to work with and already have tutorials on using them. From your description you should be fine. If space is a concern try the Really Bare Bones Board - Freeduino. Its way smaller and cheaper, plus has all the functionality you need as described.

Odisej - for some reason I didn't think to use a pot in my project. I was trying to get an actual pc keyboard working using the ps2 protocol. I've never had to use a pot before, never really worked with analog input. Is 1024 values standard or variant by pot? Also im guessing im going to have to map certain voltage ranges to the corresponding letters. Do you have some code where this is already done?

Thanks

1024 is 2^8 and this is the resolution of atmega's AD converter - 8bit. For the circuit you can let's say use a 10kOhm linear pot, put one end to +5V, the other to gnd, and the middle one goes to ADconvert. I've done some examples on other processors with this "trick", but not yet on arduino.

Ok, if I count all leters a-z + 10 numbers, we've got 36 characters(right?). We devide 1024 values to 36 needed "spaces" and we get 28,something. So in the program you would say:
int input_character=analogRead(key)/28;
char
then you can go with an array of the values, or just make a switch (didn't yet try this, but I think it should work - I hope in arduino you can declare char variable type):
switch(input_character)
{
case 0: character="a"; break;
case 1: character="b"; break;
case 2: character="c"; break;
case 3: character="d"; break;
...
}

I could also try to do this at home for you, but not before next friday, because I am away from my "workshop"...

1024 is 2^8 and this is the resolution of atmega's AD converter - 8bit.

Small mistake, but 1024 is 210, not 28. The A/D converter has ten bit accuracy.

Also, you specify ASCII char constants with single quotes, e.g., 'A' or '3', not with double quotes.

Thanks for the replies guys, i'll let you know when I can actually start the project.

@halley: thanks for the correcrions, I wrote that post in a bit of a hurry, sorry for any missleading informations. :slight_smile: