Beer timer
This a simple accelerometer activated browser based stopwatch.
See: https://w3c.github.io/deviceorientation/k
Hosted at: https://mhlyv.sytes.net/stopwatch
User interface
Very simple interface for now. When loaded the page has 2 buttons: Arm and Countdown.
- Arm: The button arm's (enables) the accelerometer. The device has to be on a flat surface, for example a table. If the table is knocked, the buttons disappear, and Reset button appears, which resets the page, and the page begins to display the time elapsed from the knock. When the table is knocked again (by the empty glass) the timer stops and displays the time elapsed from the first knock.
- Countdown: When the button is pressed, the page counts down from 10. When the countdown hits 0, the page displays the time from the end of the countdown. When the table is knocked the timer stops and displays the elapsed time from the end of the countdown.