Skip to main content

Blockly + Arduino + Grove = Blocklyduino (pre-alpha)

· 2 min read

Direct link to Blocklyduino : http://www.gasolin.idv.tw/public/blockly/demos/blocklyduino/index.html

Blockly is a web-based, graphical programming editor. Users can drag blocks together to build an application. 

Arduino is an electronics prototyping platform based on flexible, easy-to-use hardware and software.

Grove "GROVE_-_Starter_Bundle_V1.0b#LED_Twig" is a modular, safe and easy to use group of items that allow you to minimise the effort required to get started with microcontroller-based experimentation and learning.

With recent blockly update, we can make image blocks in blockly, and its pretty easy to make blocks with blockfactory. I feel it's natural to see the real hardware image while program the arduino firmware. So here is my experimental attempt called Blocklyduino.

Besides the basic arduino language functions, I choose Grove blocks to make Blocklyduino fit for non-electronic/wiring-experience people.

Here's the very early version of examples written by Blocklyduino. which should generate the same code that is correspondent to examples on grove wiki.

Digital Input example

image from grove wiki

code written by Blocklyduino Analog Input example

image from grove wiki

code written by Blocklyduino

Blocklyduino

will output the arduino source

code with setup/loop blocks as usual arduino  source code.

To upload those code to the real hardware and see how it works, you need to get a standard Arduino Uno/Duemilanove board, and a set of Grove starter-kit (optional for grove blocks).

Currently Support:  (10/6 updated)

  • arduino functions:

  • compact Digital/Analog Read/Write syntax

  • auto setup pinMode

  • delay and map

  • block

  • Grove blocks: LED, Potentiometer, Tilt switch,

Currently Lack of:

  • Variables support
  • Have to copy-n-paste source to arduino IDE to upload to board