Notes

Keep your script running

The following file includes an start() to keep the script alive:

from picraft.zero import Joystick, Wheelbase, steering_mixer, start

joystick= Joystick()
wheelbase = Wheelbase(left=0, right=1)
wheelbase.source = steering_mixer(joystick.values)

start()

README

There is a Python robot/server-side API (based on GPIOZero flows) and a HTML/JS (Web) client.

Supports camera video streaming for mono and stereo vision via a cross platform web application over WiFi. The stereo viewer supports using a Google cardboard viewer and can use the phone’s orientation to control a pan & tilt camera mount.

The Python server is designed to run on a Pi but can it run on non-Pi platforms for testing wihout the target hardware. The Web client runs on popular browsers for: Mac, Windows, Linux, Pi, iOS and Android (on both phones and tablets)

The web client has 2 virtual joysticks and also supports keyboards and HTML5 GamePads. USB Wireless Joypads connected to the Pi

Testin gamepad API support

http://html5gamepad.com


Remote GPIOZero

# on pi: “”” sudo wget https://raw.githubusercontent.com/joan2937/pigpio/master/util/pigpiod -O /etc/init.d/pigpiod sudo chmod +x /etc/init.d/pigpiod sudo update-rc.d pigpiod defaults sudo service pigpiod start sudo service pigpiod status “”“

# on ‘desktop’ “”” git clone https://github.com/rpi-distro/python-gpiozero virtualenv -p python3 gpiozero-env source gpiozero-env/bin/activate cd python-gpiozero python setup.py develop pip install pigpio

“”“