We would like to introduce the BrowserBot: a project at Dexter Industries to turn the Raspberry Pi into a robot.
“The browserBot” is a web-browser controller robot using the BrickPi. With this project, we demonstrate how to control a BrickPi robot directly from the browser of any computer, tablet, or phone.
Step 1: Overview
Using the browserBot you can build your own web-controlled robot in very very easily with just a few lines of code. The browserBot is a good place to start if you want to build a project using BrickPi to send and receive information directly to a web page.
Step 2: Building the browserBot
The browserBot uses the same body the simplebot . Here are some links for building instructions:
Step 3: Code
The code for the browserBot is available on our BrickPi Python Github Repository under the “Project Examples” folder.
To pull the example code, just clone the BrickPi Python Repository,
Overview
There are two files in the Project_Examples\browserBot folder in the repository:
- Browser_Client_Code.html : This page runs on the client computer, cell phone, or tablet browser, the one from which you want to control the bot.
- RPi_Server_Code.py: This code runs on the Raspberry Pi Server and controls the robot.
Step 4: Prepare Your Pi
This code needs “Tornado” for python installed on your Raspberry Pi. Tornado will allow us to use Web Sockets with our Raspberry Pi. Web sockets will allow us to communicate back and forth between the Raspberry Pi and the client.
For more detail: Browser Controlled Bot