Virus Attack
Buttons Works-alike
The buttons are the most critical part of the Virus Attack storyboard. In this works-like model of the button, I have explored the light and the sound interactions of a single button under different virus attack conditions.
I am using the Adafruit Circuit Playground Express, which has multiple inputs, outputs and sensors as shown in the picture below. It is compatible with arduino and hence it is easy to program.
For the interactions, I am using the neopixels, the RGB leds for the blue and red lights. The sound sensor is used to give an audio cue to the user that the virus is attacking the button. The motion sensor/accelerometer detects the tap of the player to that stops the virus from spreading. I am planning to use I2C, which is a bi-directional two-wire serial bus that provides a communication link between the multiple buttons.
When the button is not attacked the virus, its always continuously lit blue as shown below:
When the virus starts attacking, each LED will start turning red, indicating that the virus is attacking. Once the player taps, the button is saved.
If the player doesn't have sufficient time to tap the button while the virus is attacking the button, they still have 3 seconds to save the button before the virus completely destroys it.
Once the button is fully destroyed by the button, the button cannot be used anymore and would go back to the natural state only when the game resets, which is indicated by the pushbutton.