Skip to content
AutomationDirect edited this page Jan 8, 2020 · 54 revisions

Welcome to the ProductivityBlocks Wiki!

Here you will find documentation for the ProductivityBlocks tool, and for the blocks found in the program. Each block has a page with a description and a summary of the block's usage. Use the navigation pane on the right to find the information you need. Below is a quick introduction to the software.

Getting Started

ProductivityBlocks is a graphical block programming tool that writes c++ code to the Arduino editor.

Each block represents a piece of a program that will run on Arduino CPUs. To create a program, use the tabs on the left side of the application to select a block category:

Then click and drag the desired block into the main canvas:

Making a Program

Blocks snap into place when dragged close enough to a connector with the right shape.

Once a block program has been created, click the 'Verify' button to check the generated c++ code:

When the program is ready, use the 'Upload' button to push the program to a connected Arduino board.

Block Programming Basics

There are a few special blocks called Program Blocks that represent an entire program:

Loop

Program

P1 Program

Other blocks must be attached to one of these blocks in order to be a part of the full program. Blocks that are not attached to them will not generate any text for the program.

Note that block programs must only have one of these special blocks in the main canvas, otherwise the program will not be able to 'verify' or 'upload'. After placing one of these blocks on the main canvas, the rest of the program can be created by snapping new blocks onto its connectors.

Basic Block Types

There are four different kinds of blocks:

-Program: Contains the c++ program to be loaded onto an Arduino board (as described above).

-Command: A process to be done in the program.

-Function: A process that returns a value to be used in the program.

-Data: Variables and constants.

Data Types

There are 5 different basic data types in ProductivityBlocks:

-Integer

-Long Integer

-Boolean

-Character

-String

Each type has a variable block to go with it. Variables can have a user-defined name and can be set using the ‘set variable’ blocks:

Usage Notes:

  • When selecting the 'verify' or 'upload' buttons, ProductivityBlocks will write text to the active tab in the Arduino IDE. See the section for "Tabs" in the Arduino Environment Tutorial for more information.
  • When using multiple instances of the Arduino IDE (having multiple windows open), please note that each window may have a separate instance of ProductivityBlocks running with it. When using multiple instances of the Arduino IDE, take note of this when you open ProductivityBlocks for each so that you can keep track of this pairing.

Useful Links:

Clone this wiki locally