Detect Motion, Distance and stream live Raspberry Pi camera using websockets.
- Raspberry Pi + Camera
- PIR Motion Sensors
- ToF (Time-of-Flight) VL53L0X Distance Sensors
- Start your Raspberry Pi and
ssh
into it mkdir sandbox
cd sandbox
git clone --recursive https://github.com/sensidev/pir-tof-camera-websocket-example.git
python3 -m venv virtualenv
source virtualenv/bin/activate
cd pir-tof-camera-websocket-example/
pip install -r requirements.txt
cd VL53L0X_rasp_python && make && cd ..
PYTHONPATH=. python server.py
Assuming your Raspberry Pi is connected to the same router as your workstation, and both received an IP from the DHCP server, use Raspberry's IP in your browser like this:
http://192.168.0.71:8082
Enjoy playing around with motion and distance sensors while the live camera is watching you :)