Release status: beta [box doku]
|Description||using a scale to control the chrome dino game by jumping|
Paul's grandparents had a digital scale lying around that thy didn't need anymore. We decided to build something cool with it, but weren't sure what. After some thinking we decided to use it to control the chrome dino game that pops up, when there is no internet connection. The project turned out working and was successfully showcased at Streetlife and Groden. Watch a video of it here: https://www.youtube.com/watch?v=5r874Xxmr4g
- the scale
- HX711 ADC board
- WEMOS D1 mini (could be replaced by an arduino)
- a computer
- a button (for taring the scale)
We had to break open the scale to connect directly to the wires of the load cell. The wemos connects to a computer via USB. The load cells are connected to the HX711 board. The wire colors of the load cells are +: White c: Red -: Black
All the code is shared via GitLab: https://gitlab.com/uberardy/dinojump
scale to serial
The arduino sketch on the WEMOS just prints out the readings from the scale to the serial connection and tares the scale, when the tare button is pressed.
The computer is running a python script that interprets the values from the serial connection and emulates keyboard actions accordingly. When the weight measured by the scale starts rising rapidly (as it happens when someone pushes themselves of the ground), the script will press the spacebar. It will release the spacebar as soon as the weight on the scale changed from under 10kg (person is in the air) to over 10kg (person probably landed).
Issues and possible Improvements
Theoretically it should be possible to detect when a person ducks, but we didn't have motivation and time to implement it in software yet.
more resilient wiring
During the Streetlife we had some broken wires after the second day of nearly continues jumping. A scale just isn't intended to be jumped on, but keeping that in mind, it performs quite good.
It would be nice if there was no custom software needed, on the computer running the game. This should be possible by replacing the WEMOS with an arduino board that supports USB keyboard emulation.
With the serial plotter of the Arduino IDE it's easy to see the phases of jumping: