Part of the GH site of Jan Tomsa
PiGO2 enables construction of LEGO® models controlled by an application running on Raspberry Pi.
In PiGO version 2, Raspberry Pi hosts a Python web application (built with Flask framework) offering a REST-like API to control motors attached to the connectors of PiGO and to read the values from GPIO connected sensors.
The programming can be done in Snap! using custom blocks that invoke the functions of PiGO through http GET requests.
The control logic of the LEGO model is programmed in Snap! using 'Domain-level' custom blocks.
These blocks are programmed using combination of standard Snap! blocks and PiGO2 custom blocks.
PiGO2 custom blocks accomplish the communication with the Raspberry Pi through HTTP requests.
List of PiGO2 custom blocks:
TODO: Motors
TODO: ... controlled by PiconZero + dual H-bridge controller
TODO: ... controlled from web app "web.py"
TODO: ... controlled through REST-like API
TODO: ... called via HTTP from Snap! block PiconZero
TODO: ... called via HTTP from Snap!
PiGO2 is basically an slighthly improved Picon Zero pHat with 2 added H-bridges which enables it to control 2 DC motors via standard DC connectors + 3 DC motors connected to Picon Zero's servo control connectors.
To control the LEGO Power Functions, the Motor power outlets are attached to the connectors from spare LEGO Power Functions cables.
This page keep improving but is still under construction.
(03.08.2019)
Please come back soon.