Logic Blocks

Documentation

Add

add_resaved

Outputs the sum of its two inputs.

Default

Outputs the same input with no processing. Placeholder block.

Delay

Outputs the same input after a certain delay. You can set this delay in seconds in its settings.

Full Range

Scales data from the default range of 0 to 1 into the range of -1 to 1.

This has a particular use case of controlling a motor that can go forwards or backwards. A sensor’s input value of 0.5 will be converted to 0, which stops the motor. As the sensor value increases from 0.5 to 1, the motor will accelerate to full speed forwards. As the sensor value decreases from 0.5 to 0, the motor will accelerate to full speed but in the backwards direction. 

IFTTT

Triggers an IFTTT Maker Webhooks event, which lets you connect to hundreds of web services.

Create a recipe on IFTTT with a maker webhook trigger. Enter the event name and your IFTTT key in the block settings. Whenever data is sent to this block, it will trigger that event with the received value.

Invert

Inverts received data, so a 1 becomes a 0. Specifically, it outputs 1 minus the received value.

For example, 0.2 becomes 0.8, 0.5 remains 0.5, and 0.7 becomes 0.3.

Invert Motor

Inverts values in the range of -1 to 1, as converted by a Full Range block. Specifically, it outputs -1 times the received value.

This would preserve the speed of a motor but make it spin in the opposite direction.

For example, -0.8 becomes 0.8, 0 remains 0, and 0.5 becomes -0.5.

Multiply

Outputs the product of its two inputs.

Scale

Outputs the input scaled by a certain constant factor. This constant can be changed in the block’s settings.

For example, if the scale is set to 2 and it receives 0.3 it will output 0.6, but if the scale is set to 3 it will output 0.9.

Seesaw

Switches between letting a stream of data pass through, or stopping it.

The seesaw block has three inputs and outputs. The third input will accept a stream of data and output it to the third output if the block is switched on.  If the first input receives a value greater than 0.5 it will switch off. If the second input receives a value greater than 0.5 it will switch on.

The first and second outputs are used to output when the block gets switched on or off. When the block switches off, a 1 is sent to the first output and an 0 is sent to the second. When the block switches on, a 0 is sent to the first output and a 1 is sent to the second.

Switch

If the block is on, it will output a 1. If it is off it will output a 0.

It had two modes, “toggle” and “push”, which can be chosen in its settings.

In “push” mode, whenever the block receives a value, it will turn on if it’s greater than 0.5 and it will turn off otherwise.

In “toggle” mode, whenever the block receives a value greater than 0.5 it will toggle to the opposite state it was in (on or off).

Threshold

Outputs a value if it exceeds a certain threshold. The threshold and its direction (whether the values need to be bigger or smaller than it) can be changed in the settings.

An additional setting switches between “digital” mode (it will output a 1 if bigger than threshold, 0 if smaller) and analog mode (it will output the received value if bigger, 0 if smaller).

Web Post

A developer tool that makes an HTTP request to a specified endpoint when data is received. The URL for that endpoint can be set in the block settings.

The values will be sent in the blockData object within the request body JSON.