forked from CoderBotOrg/backend
-
Notifications
You must be signed in to change notification settings - Fork 1
Coderbot Overview
danentwistle edited this page Jul 13, 2015
·
2 revisions
Coderbot is a framework for building programs that can access Raspberry Pi peripherals using Blockly. Blockly is a web-based visual programming language and Coderbot provides a (Flask-based) web server for creating Blockly programs remotely in your web browser and executing them on the Pi.
- Coderbot has started on a private LAN and is accessed on 10.0.0.1:8080
- A user can load 10.0.0.1:8080 in their web browser provided they are connected to the same private LAN
- On the Coderbot website the user make a program in Blockly and presses Run
- Blockly code is translated to Python, send to the Pi, and finally executed.
- The user can preview the translated Python code by clicking Show
- The move forward Blockly puzzle piece is translated to
get_motion().move(dist=1.5)
in python. - The Flask-based webserver calls
handle_program_exec()
inmain.py
which gets the code from the client and instantiates a new python program using that code (using the classes defined inprogram.py
) - In our example,
getmotion().move(dist=1.5)
inprogram.py
eventually results in PWM output on the GPIO pins.