========
Python library for Seeedstudio Grove Devices on embeded Linux platform, especially good on below platforms:
The thought was to integrate some IOT-device into a small game. In this project, a distance sensor is used to track the player's physical position. This position is then applied to the game's space ship character, that way, the player can move a digital object with real life body movements.
- Raspberry Pi
- Grove Ultrasonic Ranger
- Host
- USB-Ethernet Adapter + RJ45
The Raspberry (which is connected to the sensor) sends the sensor data through a socket connection to the host. When the host runs the game (grove/space_slide_invaders.py) it fetches the sensor data through the client script (grove/grove_client.py) and applies it to the game character.
When everything is up and running, the yellow space ship should be controllable by the player's body movements, by moving closer to or farther away from the Ultrasonic ranger sensor.
python3 -m pip install -U pygame --user
git clone https://github.com/yruefenacht/grove.py
cd grove.py
# Python2
sudo pip install .
# Python3
sudo pip3 install .
Run grove server on Raspberry
python grove/grove_server.py 5 6
Run space slide invaders on Host
python grove/space_slide_invaders.py
Seeedstudio documentation is available here