The Raspberry Pi (RPi) side code needed to render the haptic effects for the Haptic Shoes with VR Display project. The repository includes the driver software for the 'Time of Flight (ToF)' sensor and the pruredata patches used to generate the haptic effects.
-
After powering the RPi on make sure there are no
pd-lork
processes running. This can be checked by running theps -aux
command. If there is one running make sure to kill it as this may cause an error when activating the DSP audio channel in the later steps. -
Connect the RPi to a network and pull the repository.
-
Run the command
pd Combined.pd
. -
Under
Media
from the toolbar, click onDSP on
. If an error appears on the console, make sure you followed step 1 and there is nopd-lork
process running in the background. -
Set the inlet values to the
~osc
blocks to around 255 Hz. (This can be done by clicking and dragging the mouse upwards.) -
Start all of the
metro
blocks by clicking on the1
message blocks going into them. (They can be turned off by clicking the0
message blocks.) -
Open another terminal and run the command
python3 sensor.py
. -
Move your foot up and down, you should feel some vibrations.
NOTE: Aggresive foot movements may cause the ToF sensor to lose connection with the RPi, if this happens, restart the sensor.py
script by running the same command in step 7.