Webbot a simple browser controlled robot implementation https://docs.picymru.org.uk/software/webbot

Douglas Gore 4e825a1f00 Explicitly use Python 3 PIP 1 month ago
public 37c1aac26a Some more fixes, removed un-needed Robot() class and changed UI 6 months ago
.gitattributes f8983bf967 :confetti_ball: Added .gitattributes & .gitignore files 1 year ago
.gitignore cbee49cb07 This is a major cleanup, and refactor using bottle. 7 months ago
LICENSE 31047b72d0 Added documentation improvements, code improvements, and simples! 1 year ago
Makefile 4e825a1f00 Explicitly use Python 3 PIP 1 month ago
README.md 86fb392834 Updated README.md with links to our issue tracker! 6 months ago
requirements.txt e5a3aab5cd Added RPi.GPIO and spidev to requirements.txt 6 months ago
webbot.py fbc05528c2 Removed erroneous -vf flag, that resulted in flipped images 6 months ago

README.md

webbot - A simple browser controlled robot

This is a very simple Python based robot project for the Raspberry Pi designed for use with the Cam Jam 3 robotics kit. Using gpiozero and CherryPy the program will host it's own web page which can be used to control the robot.

Kit

Installation

We've made installing everything you need to get started with our browser controlled robot easy!

git clone https://codedin.wales/picymru/webbot.git
cd webbot
make install

Usage

Running the project is easy. From your Raspberry Pi command line, run the following:

python3 webbot.py

Once running, the software will display a web address for you to connect to. By default, and for security purposes, the software will only initially allow connections from the web browser running on the Raspberry Pi by visiting http://localhost:5000

If you know what you're doing, and would like to expose the interface to all devices running on your network, then run the software using the following:

python3 webbot.py -i 0.0.0.0

This will allow you to control the robot from any device on the same network as your Raspberry Pi at http://raspberrypi.lan:5000

Control

Once connected in your browser, by default, you can use the following keys on your keyboard to control the robot:

  • Arrow keys for forwards, backwards, left turn and right turn
  • 'c' key to capture and display an image from the camera if connected
  • 'u' key to turn on/off an ultrasonic distance measurement every 2 seconds

License

This project has been developed by PiCymru as part of our education and learning programme. This project is hereby released under the terms of the MIT License, and is included below

MIT License

Copyright (c) 2016 PiCymru

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Support

Have a question? Need assistance? Don't stay stuck! If you do use this project or have any feedback we would love to hear from you, you can add an issue to our issue tracker, tweet us at @PiCymru or drop us an e-mail

Thanks

A big thanks to Tim Richardson & Mike Horne for the fantastic CamJam 3 and Ben Nuttall and the gpiozero team for such a simple library.