Welcome to PiCraftZero’s documentation!

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

“”“

Joystick

Joystick

Utils

Changelog

Release 0.1.3 (2017-15-06)

First PyPi package.

Release 0.1.0 (2017-05-04)

Initial release, May the Forth be with you.

License

The MIT License (MIT)

Copyright (c) 2017 The Bubbleworks.

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.

Indices and tables