BlocklyProp block reference for BADGE DISPLAY blocks
Compatible only with the Hackable Electronic Badge and Badge WX board types
The BADGE DISPLAY blocks work with the black-and-white OLED screen built into the badges. This 128x64 pixel display uses a coordinate grid to define where text, numbers, points, lines, and shapes can be drawn on the screen. The coordinates start at 0 (leftmost column), 0 (top row) and increase to 127 (rightmost column), 63 (bottom row).
WARNING: The BADGE DISPLAY blocks can only be used from your main program. These blocks will not work if used inside function blocks that are then launched with the new processor block.
Badge display print number
The Badge display print number block is used to send numbers to the Badge module. Numbers can be displayed as a decimal, hexadecimal, or binary.
Badge display print text
The Badge display print text block is used to send text strings to the Badge module.
Badge display print multiple
The Badge display print multiple block can print several terms of different types on a single line. Click the gear icon to drag additional terms into the list, then attach appropriate values to the block. Options are:
- text
- decimal number
- hexadecimal number
- binary number
- floating point number
- ASCII character
Checking the specify digits block adds a fill-in field next to all attached number values.
Floating point number option
BlocklyProp uses integer numbers. The floating point number option allows an integer value to be displayed as a decimal number. Use its drop-down menu to divide the integer by a multiple of 10 to scale and display the number appropriately. The specify digits checkbox activates an additional field by each numeric term.
Badge display set font
The Badge display set font block is used to set the size of the text (i.e., small: 5x7, medium: 11x15, large: 17x23).
Badge display set cursor
The Badge display set cursor block moves the cursor to the row and column specified. The display on the The Hackable Electronic Badge and the Badge WX has 128 columns and 64 rows.
The cursor position will be the top left pixel where a subsequent block's text string or number will be printed, or where a shape's origin will be.
Badge display clear screen
The Badge display clear screen block clears the entire screen by setting all pixels to black.
Badge display rotate
The Badge display rotate block turns the contents of the screen 180°.
Badge display draw point
The Badge display draw point block sets the pixel defined by the first two value blocks to the color defined by the color block.
Badge display draw line
The Badge display draw line block draws a line from the first coordinate to the second coordinate in the color defined by the color block.
Badge display draw rectangle
The Badge display draw rectangle block draws a rectangle from the first coordinate (top left corner of the rectangle) to the second coordinate (bottom right corner of the rectangle) in the color defined by the color block. The "fill" checkbox sets whether the rectangle will be drawn as hollow or filled.
Badge display draw circle
The Badge display draw circle block will draw a circle whose center is set by the first two value blocks, and in the color defined by the color block. The "fill" checkbox sets whether the circle will be drawn as hollow or filled.
Badge display draw triangle
The Badge display draw triangle block draws a triangle from the first coordinate to the second coordinate to the third coordinate in the color defined by the color block. The "fill" checkbox sets whether the triangle will be drawn as hollow or filled.