This is an advanced project with the GoPiGo to create a Browser streaming robot which can stream live video to a browser and can be controlled from the browser too .
In this example we use a the Raspberry Pi camera module with the GoPiGo. You can control the robot using the joysticks that appear on the browser and can see the live feed directly on the browser too. The video quality is very good and the latency is also very less so this project can be ideal for live video streaming robot projects.
Hardware needed:
- A fully assembled GoPiGo
- A decent battery pack providing atleast 9V (recommended 12V battery pack of 8AA cells )
- Wifi Adapter for connecting and controlling
- Raspberry Pi camera module
Connecting the Camera module
- Attach the Raspberry Pi camera module to the CSI port behing the ethernet port. For more details on how to attach the camera, refer to the official Raspberry Pi tutorial here.
Setting up the GoPiGo
Make sure that the GoPiGo is set up properly and you have the updated software and firmware. If you are not sure about this, follow the guide here.
If the GoPiGo is properly set up, connect to the GoPiGo via SSH or VNC and open terminal.
Running the example:
- Go to the Browser streaming example folder:
cd Desktop/GoPiGo/Software/Python/Examples/Browser Streaming Robot/
- Make the robot_web_server program as executable:
sudo chmod +x robot_web_server.py
- Start the robot_web_server.py to start streaming the video from the camera module
sudo ./robot_web_server.py
- Now open the browser and enter dex.local in the browser and hit enter to start streaming. You’ll also see some activity in the terminal.
- You can also stream it on a mobile device. Make sure that the device is connected on the same WiFi network. Open the browser and enter the IP address of the Raspberry Pi to start streaming the video.
You can easily adapt this example to make a streaming project with the GoPiGo and the Raspberry Pi camera module.
Have a question? Go check out our support page here or post it on the forums here.