life-size game project

Hello everyone, I have been hacking on Arduino for some time now and for 6 months now I have had a project. I would like to make a bomb (as part of a life-size game). The idea would be a box that contains 4 tubes in a block with LEDs (with presence push button) protected by a key (push button) and a password. Each tube is independent.

  • If the tube was removed without a key and / or without a password, the LEDs on the tube turn red.
  • Once the password and the key put, the LEDs you tube turns blue.
    The logical order is used the password, put the key, removed the tube
    Ideally I would also like each tube to have its password, but we will see if I can do the rest.
    For the moment I have:
  • the password program. Works independently of the rest.
  • the program of a tube with button and LEDs.
    I can’t mix it all up and make each tube independent.
    I attach my codes (very very ugly). And I hope someone can help me.

led_cle_tube.ino (1.56 KB)

Mot_de_passe.ino (11.6 KB)

"Bomb"? Not touching this one...