This program is a reaction time game for two players on the QW dev kit. The winner and his reaction time are shown in the console window and transmitted via Sigfox.
Fork of QW-Reactiontime by
QW Reaction Time Game
This program is a reaction time game for two players on the QW dev kit. The winner and his reaction time are shown in the console window and transmitted via Sigfox.
Code explanation
The program starts with the initialisation/declaration of the leds and pushbuttons. Also the necessary function prototypes and serial communications are declared. After that, the program is waiting to start the game. While the program is waiting, the leds are looping. Instructions to play the game are displayed in the console window. The game is started by pushing one of the buttons. Then the two players have to wait till all four leds turn on to push their button. The player that pushes the fastest after the leds turn on is the winner. The results of the game are shown in the console window and transmitted via Sigfox.
Sigfox message payload
First there is the "06", this is the Quicksand ID of the example program. This is used by Quicksand to keep track of our example programs. The second value that is transmitted is the ID of the winner. The third and last value that is transmitted is the reaction time of the winner.
More information and other example code can be found on the component page by clicking the link below: https://developer.mbed.org/components/QW-SIGFOX-Development-Kit/
Changes
Revision | Date | Who | Commit message |
---|---|---|---|
3:1bc9575369bd | 2016-12-15 | quicksand | changed program ID in Sigfox message |
2:73b5ca784164 | 2016-12-15 | quicksandjonas | This program is a reaction time game. The results are shown in the console window and transmitted via Sigfox. |
1:00a17f5a247c | 2016-12-13 | quicksandjonas | This program simulates a dual dice throw. The result is shown in binary on the 4 leds and is transmitted via Sigfox. |
0:6c17d1a79f75 | 2015-11-05 | quicksand | This program demonstrates the ambient light sensing functionality of the VCNL4010 on the QW Shields. |