Blocks

Actions Picker
Picker image
Name and Description
Parameters
component start
This block indicates the start of the program (or Component").

Note: This block is not in the Actions Picker, but it is an action anyway. Minibloq adds a component start block to every new component automatically
none
while
This block is a "while" cycle-begin. All the block between it and the next cycle-end block will be repeated while the condition continues to be true.
condition: bool

repeat
This block is a "while" cycle-begin. All the blocks between it and the next cycle-end block will be repeated while the condition continues to be true.

iteration count: number
if
This block allows to take decisions, based on the specified logic condition.
condition: bool

delay
This block forces the program to wait the specified time interval (in milliseconds).
interval (ms): number

variable (create)
This block creates a variable and allows to initialize it, in order to store a number, or the result of an expression, so it can be used in other sections of the program.
initial value: number

variable (asign)
This block allows to assign a value to the selected variable.
value: number

IOpin (setter)
This block allows to set the sate of a controller's digital output pin.
value: bool

AnalogWrite
This block allows to control an analog output (PWM).
value: number

SerialNumber (setter)
This block allows the program to send data (numbers) from the controller's USB port (or from a serial port, depending on the controller's hardware) to the computer.
value: number

SerialText (setter)
This block allows the program to send data (text) from the controller's USB port (or from a serial port, depending on the controller's hardware) to the computer. The text may also include emoticons.
value: text

Buzzer (setter)
This block allows to emit sounds. The first parameter sets the frequency (note) and the second sets the duration.
note (Hz): number

duration (ms): number

Motor (setter)
This block allows to control an electric motor connected to one of the controller's motor outputs.
power (-100 to 100): number



ServoRC (setter)
This block allows to set the position (in degrees) of an R/C Servo connected to the board.
angle: number

ScreenNumber (setter)
This block allows to show numbers from -99 to +99 on the controller's screen (using 8x8 LED matrix displays).
value (-99 to 99): number


ScreenBars (setter)
This block allows to show 4 numbers (each number with a range from 0 to 100) with bar shapes on the controller's screen (using 8x8 LED matrix displays).
bar0 (0 to 100): number

bar1 (0 to 100): number

bar2 (0 to 100): number

bar3 (0 to 100): number
ScreenSprite (setter)
This block allows to show one of the preinstalled sprites on the controller's screen (using 8x8 LED matrix displays).
value: sprite
Comment
This block allows to add a comment to the program.
none



number (contextual picker)

Picker image
Name and Description
Parameters
variable (getter)
This block returns the value stored in the selected variable.
none
Motor (getter)
This block returns the state of an electric motor connected to one of the controller's motor outputs.
none


ServoRC (getter)
This block returns the position (in degrees) of an R/C servo connected to a controller's digital pin.
none

AnalogRead
This block returns the value of the selected analog sensor input.
none

PulseIn
This block returns the the length (in microseconds) of a pulse in the selected digital input. For example, if the first param is true, the block will wait until the input takes that value, and then will measure the time until the input goes false again. The second param sets the maximum time the block will wait to take the measure.

value: bool

timeOut (micro seconds): number

timeStamp
This block returns the number of milliseconds since the program began.
none

ramdom
This block returns a pseudorandom number between 0 and 100.
none

buzzerNote (constant)
This block returns the frequency belonging to the selected note.
none
number (constant)
This block returns a constant number.
none



pi (constant)
This block returns the pi constant with a limited number of decimals (3.14159265358979323846).
none
e (constant)
This block returns the e constant (or "Euler's number") with a limited number of decimals (2.7182818284590452354).
none
add
This block allows to add numbers, variables and other arithmetic expressions.
value1: number

value2: number

Note: More operands (values) can be added with the add param button:
substract
This block allows to substract numbers, variables and other arithmetic expressions.
value1: number

value2: number
multiply
This block allows to multiply numbers, variables and other arithmetic expressions.
value1: number

value2: number

Note: More operands (values) can be added with the add param button:
divide
This block allows to divide numbers, variables and other arithmetic expressions. It also lets you to write numbers as fractions.
numerator: number

denominator: number
negative (unary minus)
This block makes negative the number or the arithmetic expression at its left.
value: number
power
This block allows to raise the first numerical parameter (base) to the exponent (or power) given by the second numerical parameter.
base: number

exponent: number
abs
This block returns the absolute value of the number or the arithmetic expression at its left.
value: number

modulo (remainder)
This block returns the remainder of the divistion between it's 2 parameters.
value1: number

value2: number

minimum
This block returns the minimum of two numbers, variables or other arithmetic expressions.
value1: number

value2: number

maximum
This block returns the maximum of two numbers, variables or other arithmetic expressions.
value1: number

value2: number

map
This block allows to map linearly a numerical value from a range of values (fromLow to fromHigh) to another range (toLow to toHigh).

x: number

fromLow: number

fromHigh: number

toLow: number

toHigh: number

constrain
This block allows to limit a number, variable or any other arithmetic expression to a value between a minimum (a) and a maximum (b).

x: number

a: number

b: number

sine
This block returns the sine of the angle given by the number or the arithmetic expression at its left (in radians).
value: number

cosine
This block returns the cosine of the angle given by the number or the arithmetic expression at its left (in radians).
value: number

tangent
This block returns the tangent of the angle given by the number or the arithmetic expression at its left (in radians).
value: number

arcsin
This block returns the angle (in radians) whose sine is the number or expression on the left.
value: number

arccosine
This block returns the angle (in radians) whose cosine is the number or expression on the left.
value: number

arctangent
This block returns the angle (in radians) whose tangent is the number or expression on the left.
value: number

IRRemote
This block returns the number obtained from an infrared remote control sensor.
none

Ping
This block returns the distance (in cm) measured with an ultrasonic sensor like Parallax's PING)))[TM], Seeedstudio SEN136B5B or similar.
none

IRRanger (10 to 80 cm)
This block returns the approximate distance (in cm) measured with a Sharp GP2Y0A21YK0F infrared ranger (10 to 80 cm aprox.).
none

IRRanger (20 to 150 cm)
This block returns the approximate distance (in cm) measured with a Sharp GP2Y0A02YK0F infrared ranger (20 to 150 cm aprox.).
none



bool (contextual picker)
Picker image
Name and Description
Parameters
IOPin (getter)
This block returns the state of a controller's digital pin.
none




true (constant)
This block always returns "true".
none


false (constant)
This block always returns "false".
none

equal
This block allows to compare numbers, and returns "true" if these are equal.
value1: number

value2: number

not equal
This block allows to compare numbers, and returns "true" if these are not equal.
value1: number

value2: number

lower than
This block allows to compare numbers (or arithmetic expressions), and returns "true" if the first parameter (value 1) is lower than the second one (value 2).
value1: number

value2: number
greater than
This block allows to compare numbers (or arithmetic expressions), and returns "true" if the first parameter is greater than the second one.
value1: number

value2: number
lower or equal
This block allows to compare numbers (or arithmetic expressions), and returns "true" if the first parameter is lower or equal to the second one.
value1: number

value2: number


greater or equal
This block allows to compare numbers (or arithmetic expressions), and returns "true" if the first parameter is greater or equal to the second one.
value1: number

value2: number
not
This block allows to negate logic (boolean) expressions.
value: bool


and
This block makes a logical (boolean) "AND" and returns the result.
value1: bool

value2: bool

Note: More operands (values) can be added with the add param button:
or
This block makes a logical (boolean) "OR" and returns the result.

value1: bool

value2: bool

Note: More operands (values) can be added with the add param button:
xor (exclusive-or)
This block makes a logical (boolean) "Exclusive-OR" (XOR) and returns the result.
value1: bool

value2: bool


text (contextual picker)
Picker image
Name and Description
Parameters

emoticonSmile (constant)
This block returns the "Smile face" emoticon.
none
emoticonWhatever (constant)
This block returns the "Whatever face" emoticon.
none
emoticonAngry (constant)
This block returns the "Angry face" emoticon.
none
text (constant)
This block returns a constant text.
none


sprite (contextual picker)
Picker image
Name and Description
Parameters
spriteSmile (constant)
This block returns the "Smile face" sprite.
none

spriteWhatever (constant)
This block returns the "Whatever face" sprite.
none


spriteAngry (constant)
This block returns the "Angry face" sprite.
none

spriteHeartSmall (constant)
This block returns the "Big heart" sprite.
none


spriteHeartBig (constant)
This block returns the "Small heart" sprite.
none

spriteInvader0 (constant)
This block returns the "Invader 0" sprite.
none


spriteInvader1 (constant)
This block returns the "Invader 1" sprite.
none

spriteInvader2 (constant)
This block returns the "Invader 2" sprite.
none
spriteInvader3 (constant)
This block returns the "Invader 3" sprite.
none