Next two sections discuss how Minibloq was enhanced to add a new hardware and new blocks for Electric Ray.
Goal: To add Electric Ray as a new hardware option in Minibloq.
Step 1: Create a new folder "Electric Ray" under source\Bin\Minibloq\hard.
Under this "Electric Ray" folder it should have
1) img folder - Add the images for your hardware here.
2) lib folder - contains board.h
3) rel folder - specifies all the blocks needed for Electric Ray.
4) Main.board file - This is an important xml file which maintains all the properties of the hardware.
To start with you can add all the files from Arduino Uno folder as Electric Ray is an Arduino Uno based robot.
Step 2: Clean up rel folder. Remove the block files which are not needed for Electric Ray.
Files in rel folder are named in a specified format.
E.g. action.010.0010.while.CPP.v1.0.rel
Each keyword in the format is explained below.
action - specifies type of window. Action window is the main window containing all the blocks.
Other types of windows are bool window (containing boolean blocks), number window (containing numeric blocks), text window (containing string blocks). It's also possible to create a new window.
010 - specifies the type of block within a window.
E.g action.010 - specifies control flow blocks within action window.
action.020 - specifies statement blocks within action window.
action.040 - specifies helper blocks within action window.
0010 - specifies the sequence of the block in the window.
while - specifies the name of the block
CPP - specifies the type of programming language used in the block.
v1.0 - specifies the version number of the block
Step 3: Design the thumbnails for the hardware and place it in img folder.
Step 4: Open the main.board file and change the properties like name, manufacturer, thumbnail, url etc wherever required. See below the page for attachment.
Open Minibloq. A new option for Electric Ray should be available in the hardware window.
These steps can be applied to add any new hardware interface to Minibloq.