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/
History
changed program ID in Sigfox message
2016-12-15, by quicksand [Thu, 15 Dec 2016 13:27:19 +0000] rev 3
changed program ID in Sigfox message
This program is a reaction time game. The results are shown in the console window and transmitted via Sigfox.
2016-12-15, by quicksandjonas [Thu, 15 Dec 2016 09:57:11 +0000] rev 2
This program is a reaction time game. The results are shown in the console window and transmitted via Sigfox.
This program simulates a dual dice throw. The result is shown in binary on the 4 leds and is transmitted via Sigfox.
2016-12-13, by quicksandjonas [Tue, 13 Dec 2016 16:52:23 +0000] rev 1
This program simulates a dual dice throw. The result is shown in binary on the 4 leds and is transmitted via Sigfox.
This program demonstrates the ambient light sensing functionality of the VCNL4010 on the QW Shields.
2015-11-05, by quicksand [Thu, 05 Nov 2015 09:40:10 +0000] rev 0
This program demonstrates the ambient light sensing functionality of the VCNL4010 on the QW Shields.