Values

BlocklyProp reference for VALUES blocks

Block availability varies by board type.


number value

Compatible with all Propeller board types (except Scribbler Robot)

The number value block is a value that is usually placed in or attached to other blocks that are expecting a numeric value. Any numeric value can be typed into the block. Non-integers will be truncated to integer values.  Any integer value from 232 to 232 -1, which is -2,147,483,648 to 2,147,483,647, can be entered into this block.


text string

Compatible with all Propeller board types (except Scribbler Robot)

The text string block is a string of text that is usually placed in or attached to other blocks that are expecting a string of text. Any text can be typed into the block. Some blocks limit the amount of text they can accept to 128 characters.

(Note: previous versions of this block lacked the quotation marks.)


character value

Compatible with all Propeller board types (except Scribbler Robot)

The character value block provides a numerical value from 32-126 based on the printable ASCII character selected.


music note

Compatible with all Propeller board types (except Scribbler Robot)

The music note block provides the frequency value of the selected note. This block may be used with the AUDIO > Frequency out block.

  • Choose the note desired from the first drop-down. The options include sharps/flats.
  • Choose the octave desired from the second drop-down. The range is 1 through 8.

binary value

Compatible with all Propeller board types (except Scribbler Robot)

The binary value block can store an entered binary number (base 2).


hexadecimal value

Compatible with all Propeller board types (except Scribbler Robot)

The hexadecimal block can store an entered hexadecimal number (base 16).


true/false

Compatible with all Propeller board types (except Scribbler Robot)

The true/false block provides a value of 1 (true) or 0 (false) depending on which is selected.


high/low

Compatible with all Propeller board types (except Scribbler Robot)

The high/low block provides a value of 1 (high) or 0 (low) depending on which is selected.


constant define

 Compatible with all Propeller board types (except Scribbler Robot)

The constant define block provides a named constant and gives it a value.


constant value

 Compatible with all Propeller board types (except Scribbler Robot)

The constant value block returns the value of a named constant.


color

Compatible with all Propeller board types (except Scribbler Robot)

The color block provides a 24-bit integer representing the color selected. The value provided is derived by the following formula: (Red << 16) | (Green << 8) | (Blue). In a 24-bit number, the left 8 bits represent the amount of red, the middle 8 bits represent the amount of green, and the right 8 bits represent the amount of blue.


color (Badge)

Compatible only with the Hackable Electronic Badge board type

The color (Badge) block is used with the Badge set RGB-LED block to specify the RGB-LED color.


color value from

Compatible with all Propeller board types (except Scribbler Robot)

The color value from block generates a 24-bit integer representing a color value from the red, green, and blue values (0 to 255) inserted.


get red/green/blue

Compatible with all Propeller board types (except Scribbler Robot)

The get red/green/blue block provides a value (0 to 255) representing the amount of red, green, or blue in the 24-bit color value inserted.


compare colors

Compatible with all Propeller board types (except Scribbler Robot)

The compare colors block provides a value from 0 (opposite) to 255 (identical) representing how close two 24-bit colors inserted are.


system counter

Compatible with all Propeller board types (except Scribbler Robot)

The system counter block provides the current system counter value at the moment it is asked for. The system counter increases by 1 for every system clock “tick,” and there are 80,000,000 ticks every second on the Propeller Activity Board (PAB) and PAB-WX. When the system counter reaches 4,294,967,295 it resets back to zero.