Bric(k)-o-lage – Blockly

Here are some screen-shots of the Blockly based visual programming editor for Brick-O-Lage. Roughly it works like this:

  • On the Master Brick, the bolsrv is running.
  • bolsrv uses libbol to access the bricks connected to the master via I2C
  • bolsrv also includes a mongoose based web server doing two things: serving the HTML+JavaScript based visual editor and offering a REST interface to some of the functions from libbol.
  • For Blockly I wrote blocks repesenting the Bric(k)-o-lage bricks (DIO, DCM)
  • Also fro Blockly I wrote generators creating Python code for BOL-script
  • The BOL-script is sent to bolsrv and from there to the libbol scripting engine
  • The scripting engine is embedded Python with bindings to libbol functionality

The following picture shows the available BOL blocks (DIO and DCM):

BOL blocks

BOL blocks

A simple blinky script might then look like this:

Simple Blinky Script

Simple Blinky Script

And a slightly more complex script taking input events from a DIO input and driving a DC motor through DCM brick as a response:

More Complex Script using Events

More Complex Script using Events

Here is a very early (very poor quality) video which a made when I reached the first cut-trough:

Leave a Reply

You must be logged in to post a comment.