Yet another Arduino Airsoft Bomb Prop!


I’ve made an airsoft bomb prop using this:
Link to the

,but some of the code there won’t cut it. The bomb has to be able to accept a 7 digit password (that i could achieve) for arming and defusal and (more importantly) - the user ahs to be able to set the timer using the keypad included.

Im no programing expert, well, I wouldn’t even say that i know anything about programing Arduino, so succeeding in this case isn’t possible and if anyone is willing to have some fun writing the code for me, it would be highly appreciated.

Here is how the circuit looks like:

I’ve attached the code i used so far. It works, but you cant type in the data for the timer from the keypad.

BOMB_PROJECT_1.0.ino (8.11 KB)

if anyone is willing to have some fun writing the code for me, it would be highly appreciated.

How highly?

How highly?

Well, I won't be able to actually finish this project any time soon, because i will have to learn how to program this kind of thing. So the answer is, very appreciated.

    char key = keypad.getKey();
    key == NO_KEY;
    if (key != NO_KEY)

Why are you comparing key to NO_KEY, and throwing away the result of the comparison?

  while (currentLength < 7)

  if (currentLength == 7)

How can currentLength NOT equal 7, when the while statement has no break statements?

               void software_Reset();
                 asm volatile ("  jmp 0");

Why do you have a function defined inside another function?

Your code seems to think that getKey() is a blocking function. It is NOT. If no key is being pressed, the function returns NO_KEY. The code in the while loop in timer() makes no sense.

          Scount --; // add 1 to Scount

I suppose that ++ subtracts one in your world…

          delay(10); // waits for a second

It does not.

If you are going to have useless comments, you MUST make the code match the useless comment.

I’m sorry.

That code is taken from the instructables website (link in original post), and all of those comments and solutions are done by the original author. The code isn’t done by me and now i see i haven’t mentioned that in the first post - that’s why im sorry.

You found a lot of mistakes, so if you think this code is done poorly from the beggining you could start all over with an empty sheet - that’s why i’ve attached the schematic above.

What is interesting is that with all those mistakes in the code the device works all right, although it lacks the function im interested in (typing in the time for the timer).

All of the diferences between my code and the original are minor (besides the code connected to the keypad - original code has different pins for the keypad compared to my keypad).

If you want to correct the issues that have been pointed out to you, go ahead. If you want code written for you, you should post in "Gigs and Collaborations". You should probably bring your wallet.

Scince this post was moved to the right section, maybe there will be someone awsome to help out?

You've got mail...

How highly?

So if anyone is following this thread, I ended up doing this pro bono.

I didn’t really try to fix the op’s code or his comments and added the requested features in the style of the existing coding to minimize impact – so don’t grade me on this one!


BOMB_PROJECT_1.1.ino (10.1 KB)

Hello Sr. Patduino, y send you a message to see him something that notices he knows coding. I appreciate respond to the email I put. Thanks

By the way very good attitude on your part to help here. Greetings from Uruguay

Hi Riulsadam,

I received your PM and have responded with an email as requested.