https://github.com/esimkowitz/robotcontrol
A simple controller for a simple robot.
https://github.com/esimkowitz/robotcontrol
javascript python python3 raspberry-pi remote-control robotics streaming
Last synced: about 1 month ago
JSON representation
A simple controller for a simple robot.
- Host: GitHub
- URL: https://github.com/esimkowitz/robotcontrol
- Owner: esimkowitz
- License: mit
- Created: 2017-07-22T18:41:52.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2022-12-19T07:52:27.000Z (over 3 years ago)
- Last Synced: 2025-01-08T17:07:47.973Z (over 1 year ago)
- Topics: javascript, python, python3, raspberry-pi, remote-control, robotics, streaming
- Language: Python
- Size: 38.1 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RobotControl
A simple controller for Raspberry Pi robots powered by the [Adafruit DC & Stepper Motor HAT](https://www.adafruit.com/product/2348).
## Installation
Use the following script to download and install RobotControl:
```bash
cd ~
git clone https://github.com/esimkowitz/RobotControl.git
cd ~/RobotControl
sudo python3 setup.py install
```
## Usage
### Getting started
To run RobotControl, use the following script:
```bash
cd ~/RobotControl/RobotControl
python3 app.py
```
This will start the webserver on port ``5000``.
To use the controller, open a browser and navigate to ``http://:5000``, replacing ```` with the IP address of your Raspberry Pi.
Please note that I've only tested this with the Pi and the controlling device on the same WiFi network.
### The Controls
The controller displays a low-latency video stream from the Pi's camera.
The controls work on desktops and multi-touch devices. On desktops, the best way to control the robot is using the arrow or WASD keys. On mobile/multi-touch devices, the best way to control the robot is to drag your finger along the screen in the direction you want the robot to move.
Dragging your finger along the screen will enable a joystick that can be used to control the robot. This works on both touchscreens and by clicking-and-dragging with the mouse, but it's really meant for touchscreens.
### Stopping the program
Stop RobotControl at any time by pressing ``Ctrl-C`` in the terminal window.
## Questions/Concerns
Please open an issue if you run into trouble.
## Acknowledgements
Thanks to yoannmoinet's [nipplejs](https://github.com/yoannmoinet/nipplejs) library for the joystick functionality.
Thanks to waveform80's [pistreaming](https://github.com/waveform80/pistreaming) demo for the low-latency video streaming.
Thanks to phoboslab's [jsmpeg](https://github.com/phoboslab/jsmpeg) library for the Javascript video decoder.