This countdown timer is part of an ExitGame where payers have to deactivate a bomb by coding challenges.
The timer runs a second based countdown in the format "00:00".
The countdown can be controlled by a REST interface.
The code runs on an Arduino compatible Adafruit Feather HUZZAH with ESP8266.
It controls a SparkFun 7-Segment Serial Display.
So wee don't need to manual control each segment. Instead serial data can be sent.
Name | Method | Param | Description |
---|---|---|---|
start |
GET | time [ms] | Starts the countdown timer with the given time. |
stop |
GET | time [ms] | Stops the countdown timer and displays the finish time. |
resume |
GET | - | Restarts the countdown. |
disable |
GET | - | Deactivates the timer, so all lights are off. |
- Install Arduino IDE
- Setup the Arduino IDE for the Adafruit Feather HUZZAH
- Install the
aREST
lib:
Tools > Manage Libraries.. Search & installaREST
(v2.7.5 by Marco Schwartz) - Open the
timer.ino
in the Arduino IDE. - Change the variables
ssid
andpassword
to match your W-LAN credentials. - Verify, Compile & Upload the sketch to the board.
- Connect the the Feather board with the 7-Segment Serial Display. Add a 5V power supply:
The timer shows "Connecting" and "Ready" after connecting to a WLAN.
Feather - PIN | Connect | 7 Segment - PIN |
---|---|---|
VCC | ⟷ | USB |
GND | ⟷ | GND |
RX | ⟷ | 16 |
- Test the timer by sending a
GET
to it's IP withstart?time=120000
.