The Workspace is where you can insert and connect Hardware and Virtual Blocks together.
Insert Blocks into the Workspace
You can insert Hardware or Virtual Blocks into the Workspace by clicking on them in the Blocks Menu.
When a Block is inserted into the Workspace, if you click or hover over the block, three options will pop up below the block.
|Open the properties panel of the block. Each block will have different properties that can altered to suit your needs. The Hardware Blocks Section goes through the different properties for each of the blocks.||Opens the Logic Maker for the specific block.||Removes the block from the Workspace.|
Making Connections Between Blocks
Each block has specific Actions and/or Inputs that are related to the block. In some cases you may want the Input from one block to control the Action of another. An example would be a touch Input from the Touch Block to control the LEDs lighting up on the LED Matrix Block.
To allow Blocks to interact with one another you will need to connect them within the Workspace. To do this you can click and drag between ports of the blocks in the Workspace.
To remove a link drag the link out from the connecting block
It is important to note that the direction of the arrows between ports on Blocks indicates which block is in control and which block is being controlled.
In the case above, the IR Block will control the Motor Driver and EmailSender Blocks. So it is called the Parent Block. This is done by dragging the link from the right port on the Block.
Conversely, the MotorDriver and Email Sender Blocks are controlled by the Parent Block as their links go to their left ports. In this case, they are both Child Blocks.
A Parent Block can have multiple Child Blocks and a Child Block can also have multiple Parent Blocks.
In most cases you will create your logic within the Parent Block's Logic Maker since it is the block that is in control and has access to Actions of both the Parent and Child Block. However, Block Inputs are only accessible within their respective blocks irrespective of being Parent or Child. A work-around for using inputs in a parent block is by connecting an OUTPUT Gate to the INPUT Gate within the Child Block. Outputs are universally accessible across all Blocks.
|Parent Block||Child Block|
|Action||Can access Actions of both Parent Block and Child Blocks||Can only access its own Actions|
|Input||Can only access its own Inputs||Can only access its own Inputs|
As an example here is a Temperature Block as a Parent and an LED Matrix Block as a Child.
If we go into each of their Logic Makers to see their Inputs and Actions you will see that the Temperature Block has both the Inputs and Actions from itself and the LED Matrix Block.
The Led Matrix on the other hand only can see Actions and Inputs from itself.
|Temperature Block - Parent||LED Matrix Block - Child|