Block and I/O pin availability will vary with board type. Use care if accessing I/O pins connected to built-in accessory circuits on your board. Refer to your board's product guide for I/O pin assignment details.
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.
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.
The Badge display print text block is used to send text strings to the Badge module.
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:
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.
The Badge display set font block is used to set the size of the text (i.e., small: 5x7, medium: 11x15, large: 17x23).
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.
The Badge display clear screen block clears the entire screen by setting all pixels to black.
The Badge display rotate block turns the contents of the screen 180°.
The Badge display draw point block sets the pixel defined by the first two value blocks to the color defined by the color block.
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.
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.
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.
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.
Block availability varies by Badge type.
Using any of the Badge RGB-LED blocks on the Badge WX will cause one processor to be launched automatically (one total, NOT one per block).
Compatible only with the Badge WX board type
The Badge RGB-LED setup block is used to tell the Propeller how many RGB-LEDs are connected to the Badge WX. The Badge WX has 4 RGB-LEDs built in and a pin available to connect more.
Compatible only with the Badge WX board type
The Badge RGB-LED set block is used to specify the color for a specific LED.
Compatible only with the Badge WX board type
The Badge RGB-LED set multiple block is used to specify the color for a range of consecutive LEDs.
Compatible only with the Badge WX board type
The Badge RGB-LED update block is used to update colors of all connected RGB-LEDs.
Compatible only with the Badge WX board type
The Badge LED brightness block sets the brightness of a specified LED.
Compatible only with the Hackable Electronic Badge board type
These Badge set LED blocks are used to turn the specified LED on or off.
Compatible only with the Hackable Electronic Badge board type
The Badge set RGB-LED block sets the specified RGB-LED to a specified color.
Compatible only with the Badge WX board type
The Badge WiFi lock block has two functions, chosen by the drop-down menu:
See the Badge WX Product Guide, under Downloads at the Badge WX product page [1].
Available for Activity Board, FLiP, and Other board types. Not available for Badge or Scribbler Robot board types. I/O pin availability will vary with board type.
The 296 x 128 2.9 inch ePaper Display (#28084) [2] uses a coordinate grid to define where text, numbers, points, lines, and shapes can be drawn on the display module’s screen. The coordinates start at 0 (leftmost column), 0 (top row) and increase to 295 (rightmost column), 127 (bottom row).
The ePaper initialize block is used to set up the Color ePaper display module. The DIN, CLK, CS, D/C, and RES pins on the module must be matched to the Propeller I/O pins they are connected to.
If you have defined a constant using the constant define block, the constant will show up in all of the pin menus and can be selected instead of a numbered pin:
If you forget to use this block in your project, other ePaper blocks will display a triangle warning symbol. Click the triangle, and you will see a reminder message to use the ePaper initialize block at the beginning of your program.
The Display font loader block must be run as its own program, with no other blocks, before any medium or large fonts can be used. When this block is run, it takes about a minute to load all of the fonts onto the EEPROM memory chip on the Propeller Board.
The fonts are stored in EEPROM locations 40576..63400. This same block, using the same EEPROM locations, is also available from the OLED menu.
Because the ePaper library uses an image buffer, the ePaper update block must be used to draw to the ePaper screen. This block sends anything that has been drawn to the buffer to the display since the previous time this block was used.
For example, when you use an ePaper draw rectangle block by itself, noting changes on the ePaper display. If you this block immediately after the ePaper draw rectangle block, the rectangle will appear.
The ePaper max height block returns the vertical value of the bottom row of pixels: 63 when the pins are in a vertical orientation, 95 when the pins are in a horizontal orientation.
The ePaper max width block returns the horizontal value of the rightmost column of pixels: 95 when the pins are in a vertical orientation, 63 when the pins are in a horizontal orientation.
The ePaper command block permits you to choose and execute the command selected from the drop-down menu:
The ePaper font color block is used to set both the color of the font and the background (highlight) color displayed behind the font characters. If the background color is set to the same color as the font color, the background will be made transparent.
The ePaper set text block is used to set the size (small: 5x7, medium: 11x15, large: 17x23) and the font face (sans/console, serif/typewriter, script/handwriting, bubble/cartoon).
The ePaper set cursor block sets the top left pixel position where text starts being written.
The ePaper print text block is used to send text strings to the ePaper module. Nothing will appear on the ePaper display until an ePaper update block is used.
The ePaper print number block is used to send numbers to the ePaper module. Numbers can be displayed as a decimal, hexadecimal, or binary. Nothing will appear on the ePaper display until an ePaper update block is used.
The ePaper 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:
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.
Nothing will appear on the ePaper display until an ePaper update block is used.
The ePaper draw pixel block sets the pixel defined by the first two value blocks to the color defined by the color block. Nothing will appear on the ePaper display until an ePaper update block is used.
The ePaper draw line block draws a line from the first coordinate to the second coordinate in the color defined by the color block. Nothing will appear on the ePaper display until an ePaper update block is used.
The ePaper 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. Nothing will appear on the ePaper display until an ePaper update block is used.
The ePaper 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 “roundness” value, if set to something other than zero, will round the corners by the amount specified (radius of the roundness). The “fill” checkbox sets whether the rectangle will be drawn as hollow or filled. Nothing will appear on the ePaper display until an ePaper update block is used.
The ePaper 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. Nothing will appear on the ePaper display until an ePaper update block is used.
Displaying bitmap images from an SD card is SLOW! It will take approximately 45 seconds to draw a bitmap that fills the screen to the ePaper module. While it is drawing, it will look like nothing is happening.
You can use ePaper Bitmap blocks in the same program as play WAV file blocks. However, block order matters. The ePaper Bitmap block lets go of the SD card file access automatically after fetching the image to be displayed. However, the WAV play [3] block does not. Use the WAV stop [3] block before trying to use an ePaper Bitmap block, or just draw the image before starting the WAV player.
The ePaper Bitmap block will draw a bitmap (BMP file format) saved on an SD card attached to the Propeller microcontroller. When using the board type for the Activity Board and Activity Board WX, which have built-in microSD card slots, the SD card is automatically initialized when this block is called. When using the FLiP or other board types, you will need to use the SD initialize [4] block at the beginning of your program.
The bitmap/BMP file must have the following requirements met:
The following online file converter https://image.online-convert.com [5]is able to create BMP files from nearly any kind of image. This online tool can also be used to resize the image to ensure that it will render properly.
On the ePaper display, the image will be drawn as black and white. If the original file was in color, the average luminosity of the pixel will be used to determine if that pixel is drawn as black or white. One way to make a color or greyscale image to appear well on a black and white display is to use a dithering tool. One is available online here (note that it does not produce BMP images, so its output will have to be converted): https://29a.ch/ditherlicious [6].
Nothing will appear on the ePaper display until an ePaper update block is used.
For Propeller Activity Board WX (via USB connection only), Hackable Electronic Badge, FLiP, and Other board types.
The GRAPH blocks are used to generate a visual graph of data in BlocklyProp's Graphing window. This window will open automatically when you run a project that uses these blocks.
Do not try to use Graph and Terminal blocks in the same project. The Terminal takes charge and will prevent the Graphing window from opening. You would, however, see some data values appear in the Terminal window.
Do not use the Graph blocks in a function that will be launched with the New Processor block. It won't work - the Graph needs to be used from your project's main processor.
Use the Graph initialize block at the beginning of your project to set the display area for the data that your project will graph.
The Graph value block sends the attached value to the graph display. Click the gear to display additional values from the same block; you will be able to label each value. Each value plotted is a different color, with a matching label and numerical data displayed in a box in the Graphing window's upper right corner.
Available for Activity Board, FLiP, and Other board types. Not available for Badge or Scribbler Robot board types. I/O pin availability will vary with board type.
The 96 x 64 Color OLED display module (#28087) [8] uses a coordinate grid to define where text, numbers, points, lines, and shapes can be drawn on the display module’s screen. The coordinates start at 0 (leftmost column), 0 (top row) and increase to 95 (rightmost column), 63 (bottom row).
See the OLED Display with BlocklyProp tutoria [9]l to get started.
WARNING! The OLED 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.
The OLED initialize block is used to set up the Color OLED display module. The DIN, CLK, CS, D/C, and RES pins on the module must be matched to the Propeller I/O pins they connect to.
If you have defined a constant using the constant define block, the constant will show up in all of the pin menus and can be selected instead of a numbered pin:
If you forget to use this block in your project, other OLED blocks will display a triangle warning symbol. Click the triangle, and you will see a reminder message to use the OLED initialize block at the beginning of your program.
The Display font loader block must be run as its own program, with no other blocks, before any medium or large fonts can be used. When this block is run, it takes about a minute to load all of the fonts onto the EEPROM memory chip on the Propeller Board.
The fonts are stored in EEPROM locations 40576..63400. This same block, using the same EEPROM locations, is also available from the ePaper menu.
The OLED max height block returns the vertical value of the bottom row of pixels: 63 when the pins are in a vertical orientation, 95 when the pins are in a horizontal orientation.
The OLED max width block returns the horizontal value of the rightmost column of pixels: 95 when the pins are in a vertical orientation, 63 when the pins are in a horizontal orientation.
The OLED command block permits you to choose and execute the command selected from the drop-down menu:
The OLED font color block is used to set both the color of the font and the background (highlight) color displayed behind the font characters. If the background color is set to the same color as the font color, the background will be made transparent.
The OLED set text block is used to set the size (small: 5x7, medium: 11x15, large: 17x23) and the font face (sans/console, serif/typewriter, script/handwriting, bubble/cartoon).
The OLED set cursor block sets the top left pixel position where the text is to begin next.
The OLED print text block is used to send text strings to the OLED module.
The OLED print number block is used to send numbers to the OLED module. Numbers can be displayed as a decimal, hexadecimal, or binary.
The OLED 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:
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.
The OLED draw pixel block sets the pixel defined by the first two value blocks to the color defined by the color block.
The OLED draw line block draws a line from the first coordinate to the second coordinate in the color defined by the color block.
The OLED 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 is drawn as hollow or filled.
The OLED 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 “roundness” value, if set to something other than zero, will round the corners by the amount specified (radius of the roundness). The “fill” checkbox sets whether the rectangle will be drawn as hollow or filled.
The OLED 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.
Displaying bitmap images from an SD card is SLOW! It will take approximately 20 seconds to draw a bitmap that fills the screen to the OLED module. Keep this in mind when designing your programs.
You can use OLED Bitmap blocks in the same program as WAV play [3] blocks. However, block order matters. The OLED Bitmap block lets go of the SD card file access automatically after fetching the image to be displayed. However, the WAV play [3] block does not. Use the WAV stop [3] block before trying to use an OLED Bitmap block, or just draw the image before starting the WAV player.
The OLED Bitmap block will draw a bitmap (BMP file format) saved on an SD card attached to the Propeller microcontroller. When using the board type for the Activity Board and Activity Board WX, which have built-in microSD card slots, the SD card is automatically initialized when this block is called. When using the FLiP or other board types, you will need to use the SD initialize [4] block at the beginning of your program.
The bitmap/BMP files meet the following requirements:
The online file converter https://image.online-convert.com [5]can create BMP files from nearly any kind of image. This online tool can also be used to resize the image to ensure that it will render correctly.
For Activity Board, FLiP, and Other board types. Not available for Badge or Scribbler Robot board types.
The PROTOCOLS blocks simplify communication between the Propeller microcontroller and other electronic devices that use a standardized method of communication.
I/O pin availability will vary with board type. Use care if accessing I/O pins connected to built-in accessory circuits on your board. Refer to your board's product guide for I/O pin assignment details.
This block launches a processor automatically, one processor per block.
The serial initialize block sets up a serial connection. If you forget to use this block, other serial blocks will remind you with a triangle-shaped warning icon:
You may set up more than one serial connection by using a separate Serial initialize block for each. If you set up more than one serial initialize block in a project, a drop-down menu will appear on the serial transmit and serial receive blocks to select the target serial connection's Propeller I/O pin.
For each instance:
The serial transmit block sends the value in the inserted block, converted to a zero-terminated text string. Pre-format the value into one of the following forms with the drop-down menu:
If using more than one serial initialize block, select the Propeller I/O pin for the target serial connection in the dropdown that will appear.
Note that the original blocks serial transmit text and serial transmit number have been deprecated.
The serial receive block collects a string of characters until it receives a terminating zero. The characters are then decoded into the type of value chosen in the drop-down menu, and that value is stored in the specified variable item.
If using more than one serial initialize block, select the Propeller I/O pin for the target serial connection in the dropdown that will appear.
Note that the original blocks serial receive text and serial receive number have been deprecated.
The Serial send multiple block is used to send attached values or text to the device connected to the specified pin.
The Serial receive multiple block is used to receive numbers or characters from the specified pin and store them in the specified variables.
The Serial status block returns true (1), false (0), or a character depending on the status of the serial connection and the type of status required.
The shift in block receives a value sent to the Propeller serially. The DATA and CLK pins must be matched to the pins that are connected to the device sending the serial information. The shift in block will receive the number of bits specified by the first drop-down menu, in the order specified by the second drop-down menu (MSB: Most significant bit first or LSB: Least significant bit first), and manner specified by the third drop-down menu: read the DATA pin before the clock, or read the DATA pin after the clock.
If you have defined a constant using the constant define block, the constant will show up in all of the pin menus and can be selected instead of a numbered pin:
The shift out block sends a value serially. The DATA and CLK pins must be matched to the pins that are connected to the device receiving the serial information. The shift out block will send the number of bits specified by the first drop-down menu, in the order specified by the second drop-down menu (MSB: Most significant bit first or LSB: Least significant bit first).
If you have defined a constant using the constant define block, the constant will show up in all of the pin menus and can be selected instead of a numbered pin:
For Activity Board, FLiP, and Other board types. Not available for Badge or Scribbler Robot board types.
BlocklyProp supports just one RGB-LED Init block per project, so if you want to use multiple RGB LEDs, chain them together instead of wiring them to separate Propeller I/O pins. These blocks are intended for WS2812B RGB LED modules (Parallax #28025 [10]& 28026 [11]).
This block launches a processor automatically, one per block instance.
The RGB-LED init block is used to specify the Propeller I/O pin connected to the RGB LED module(s), and to also specify the number of LEDs chained together. If you forget to use this block, other RGB-LED blocks will remind you with a triangle-shaped warning icon:
If you use more than one RGB-LED init block in a project, the RGB-LED set and RBG-LED update blocks will provide a dropdown for selecting the targeted Propeller I/O pin for a given set of RGB-LEDs.
The RGB-LED set block allows you to choose a color for a specific RGB LED.
Use a new block to set the color for each RGB LED in the chain. The settings will not take effect until the program execution reaches an RGB-LED update block.
*Keep in mind that with WS2812B LEDs, brightness and current draw will vary by color, with white being the brightest and most power-consuming setting.
The RGB-LED set block allows you to choose a color for a specific contiguous range of RGB LEDs chained together.
Use a new block to set the color for each RGB LED in the chain. The settings will not take effect until the program execution reaches an RGB-LED update block.
*Keep in mind that with WS2812B LEDs, brightness and current draw will vary by color, with white being the brightest and most power-consuming setting.
The RGB-LED update block updates all of the RGB LED colors to the settings specified in the most recent RGB-LED set blocks. Each time the colors are changed with RGB-LED set blocks, the RGB-LED update block must be used again to see the new colors.
If you use more than one RGB-LED init block in a project, the RBG-LED update blocks will provide a dropdown for selecting the targeted Propeller I/O pin for a given set of RGB-LEDs.
For Activity Board, FLiP, and Other board types. Not available for Badge or Scribbler Robot board types. I/O pin availability will vary with board type. Use care if accessing I/O pins connected to built-in accessory circuits on your board. Refer to your board's product guide for I/O pin assignment details.
The SERIAL LCD blocks are used to set up and send information to be displayed (or played) on Parallax 2x16 (#27976 [12] & #27977 [13]) and 4x20 (#27979 [14]) character LCD modules.
This block launches a processor automatically. Use only instance of this block per project.
The LCD initialize block is used to set up a connection to a Parallax Serial LCD module. If you forget to use this block, other LCD blocks will remind you with a triangle-shaped warning icon:
If you have defined a constant using the constant define block, the constant will show up in all of the pin menus and can be selected instead of a numbered pin:
The module can be plugged into the breadboard on the Propeller Activity Board or Propeller Activity Board WX, and the +5VDC, GND, and RX wires can be connected as shown:
The LCD print text block sends the inserted text string to the serial LCD module.
The LCD print number block sends the inserted number value to the serial LCD module. Use the dropdown menu to choose how to display the value, as a decimal, hexadecimal, or binary number.
The LCD 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:
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.
The LCD command block is used to issue specific commands to the LCD module. Select an option from the dropdown menu:
The LCD set cursor block sets the position of the cursor on the LCD screen. It can be used to print text or numbers at any location on the screen.
The LCD play note block is used to make the Parallax LCD module play a musical note from its onboard piezo speaker.
Available for all board types via a USB connection. Not currently available over WiFi with the Activity Board WX or Badge WX.
The TERMINAL blocks are used for displaying text on your computer screen, using BlocklyProp's built-in Terminal. The Terminal will open automatically when you run a project that uses these blocks.
Do not try to use Terminal and Graph blocks in the same project. The Terminal takes charge and will prevent the Graphing window from opening. You may, however, see some data values appear in the Terminal window.
Do not use the Graph blocks in a function that will be launched with the New Processor block. It won't work - the Graph needs to be used from your project's main processor.
The Terminal print text block is used to send text to the Terminal window. When checked, the "then a new line” checkbox adds a carriage return to the end of the text that was sent, moving the cursor to the beginning of the next line in the Terminal. (Note: earlier versions of this block omitted the quotation marks around the text string.)
The Terminal print number block sends the inserted value to the Terminal window. Set the drop-down menu to display the number as a decimal, hexadecimal, or binary. The “then a new line” checkbox, when checked, adds a carriage return to the end of the number that was sent, moving the cursor to the beginning of the next line in the Terminal.
The Terminal print multiple block can print several terms of different types on a single line. When checked, the "then a new line” checkbox adds a carriage return to the end of the text that was sent, moving the cursor to the beginning of the next line in the Terminal.
Click the gear icon to drag additional terms into the list. Checking the "specify digits" box adds an optional field to all numeric values. Then attach appropriate values to the block, and optionally specify how many digits to display for each numerical value. Options are:
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 Terminal receive text block stores any characters typed into the Terminal into the variable item chosen in the drop-down menu. The characters entered, even if they are numbers, are stored as a string. This block will continue to collect up to 128 characters until the user presses the enter key (sends a carriage return character). Program execution will pause until the carriage return character is received.
The Terminal receive number block stores numerical characters typed into the Terminal into the variable item chosen in the drop-down. The number entered is stored as an integer. This block will continue to collect numerical characters until the user presses the enter key (sends a carriage return character). Program execution will pause until the carriage return character is received.
The Terminal new line block sends a single carriage return character to the Terminal, moving the cursor to the beginning of the next line.
The Terminal clear screen block sends a special character to the screen, which causes the Terminal to clear and reset the cursor to the top left (0,0) position.
The Terminal set cursor block positions the cursor in the window.
The Terminal close block closes the Simple Terminal object so that pins 30 and 31 can be used for other purposes such as a full-duplex serial connection.
UNDER CONSTRUCTION! BlocklyProp reference for using Parallax WX ESP8266 WiFi Module communication blocks.
Compatible with the Activity Board WX, FLiP, Badge WX, and Other board types only.
This module comes in two form factors:
UNDER CONSTRUCTION!! These blocks are under development and not yet available on our production Blocklyprop tool.
BlocklyProp block reference for Simple WX blocks. Use these with the Parallax ESP8266 WX WiFi Module
Compatible with the Activity Board WX, FLiP, Badge WX, and Other board types only.
Use these with Parallax products containing an ESP8266 WX WiFi Module.
Compatible with the Activity Board WX, FLiP, Badge WX, and Other board types.
The Simple WX blocks and Advanced WX blocks are NOT compatible with each other!
A program that contains Advanced WX blocks cannot contain any Simple WX blocks, and a program that contains Simple WX blocks cannot contain any Advanced WX blocks.
This block launches one processor automatically.
The Advanced WX initialize block is required when using other WX advanced blocks on any board or device except the Badge WX.
Use the mode drop-down menu to determine where the Terminal output should be routed through (this is for any blocks using Terminal or Graphing). Text sent between the computer and your board/device can be routed through the USB cable or, in future BlocklyProp versions, the WX module:
Use the DI (Data In) menu to select to which pin the DI pin of the WX module is connected. If you select a pin other than the WX socket, then a second DO (Data Out) menu will appear for you to define that pin connection as well.
The Advanced WX connect block instructs the WX module to listen for incoming HTTP, WebSocket, or TCP data.
The WX module can listen for data from up to four sources. Therefore, this block can be used up to four times.
When it establishes a connection, the program stores the ID for this connection in the variable specified by the store ID in menu.
For each type of connection, you must specify a path as a string of text for the module to connect. For example, to connect to a web service via HTTP, you could use "http://blockly.parallax.com/blockly/ping" or the URL for your specific web service.
HTTP and WebSocket connections default to port 80. For TCP connections, an additional input will appear. You must specify this port as a number.
The Advanced WX poll block instructs the WX module to check the connections set up by the Advanced WX connection block for any incoming data. If any data is received, then a character code for the event type is stored in the variable specified by the first drop-down:
The ID of the connection corresponding to the event code will be stored in the variable specified by the second drop-down menu.
A handle that can be used to retrieve any data from this poll will be stored as a number in the variable specified by the third drop-down menu.
The Advanced WX print block can print several terms of different types to the WX module.
First, specify whether the information will be sent:
Next, specify the connection handle, retrieved by the Advanced WX poll, where you want the string of text sent.
Click the gear icon to drag additional terms into the list. Options are:
This block works similarly to the Terminal print multiple shown in this video:
BlocklyProp uses integer numbers. The floating point number option allows a program to display an integer value 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, as shown in the video below using the Terminal print multiple block.
The Advanced WX send block sends the attached string of text to a TCP connection specified by the handle provided.
The handle is one of the values retrieved by the Advanced WX poll block.
The Advanced WX scan multiple block scans the received string and stores the data extracted from the string as specified.
First, specify where the information has been retrieved from:
Next, specify the connection handle, retrieved by the Advanced WX poll, where the string of text should be sent.
Click the gear icon to drag additional terms into the list. Options are:
For POST requests, the name in the name/value pair should be specified in the "string starts with txt" parameter.
The Advanced WX scan string stores an incoming string in the specified variable.
First, specify whether information has been retrieved from:
Next, specify the connection handle, retrieved by the Advanced WX poll, where the string of text should be sent.
Lastly, specify the variable in which to store the string.
If you are retrieving data from a TCP connection, you must store the string in the variable set at the WX buffer by the Advanced WX buffer block.
String variables only store up to 64 characters by default. Use the Advanced WX buffer block (for TCP connections), or the String variable set size in the OPERATORS > STRINGS menu if you need to store a longer string.
The Advanced WX receive block receives and stores an HTTP response header or data from a TCP or WebSocket connection.
First, specify the string variable in which to store the received string.
String variables only store up to 64 characters by default. Use the String variable set size in the OPERATORS > STRINGS menu if you need to store a longer string.
Next, specify the variable where the length of the received string will be stored.
Then, specify an active connection handle, retrieved by the Advanced WX poll.
Lastly, make sure that the maximum bytes retrieved is long enough for the incoming string.
The Advanced WX mode block sets or gets the current mode of the WX module.
The Advanced WX code block provides the value for one of the codes used by the WX module.
The Advanced WX buffer block is used to set a receiving buffer. If you are not receiving all of the characters from an incoming stream of data, then you may need to increase the size of this buffer.
Use only as much buffer space as you need. There is a limited amount of memory available on the Propeller, and issues such as program lockup may occur when string buffers use more memory than is available.
The Advanced WX join network block allows you to join a WiFi network by specifying its SSID and that network's passphrase.
The Advanced WX disconnect block disconnects the WX module from the specified connection.
The Advanced WX IP address block provides the IP address of the specified mode as a string. Because the WX module can be both a station and an access point, it may have separate IP addresses for each.
For Activity Board, FLiP, and Other board types. Not available for Badge or Scribbler Robot board types. I/O pin availability will vary with board type.
These blocks work with XBee 802.15.4 (series 1) RF modules [17]. For any XBee model, you may also use the Serial Initialize, Serial transmit, and Serial receive [18] blocks for direct asynchronous serial communication.
This block launches a processor automatically.
The XBee initialize block sets up a serial connection to an XBee module.
* These drop-down options go from 0 to 27 but do not set higher than 17 with the Propeller Activity Board WX, as P18-P31 are already connected to other built-in circuits on this board. Use jumper wires to connect DO and DI sockets on the header in the middle of the board to I/O pin sockets alongside the breadboard.
If you have defined a constant using the constant define block, the constant will show up in all of the pin menus and can be selected instead of a numbered pin:
The XBee transmit block sends a number (as an ASCII string in decimal format), a string, or a single byte depending on the option chosen using the drop-down menu.
The XBee receive block receives a number (as an ASCII string in decimal format), a string, or a single byte depending on the option chosen using the first drop-down menu and stores it in the variable selected in the second drop-down menu.
The Xbee send multiple block is used to send attached values or text to the Xbee module.
The Xbee receive multiple block is used to receive numbers or characters from the Xbee module and store them in the specified variable.
Links
[1] http://www.parallax.com/product/20300
[2] https://www.parallax.com/product/28084
[3] https://learn.parallax.com/ab-blocks/audio
[4] https://learn.parallax.com/ab-blocks/memory
[5] https://image.online-convert.com/convert-to-bmp
[6] https://29a.ch/ditherlicious/
[7] http://learn.parallax.com/tutorials/language/blocklyprop/simple-blocklyprop-programs-propeller-boards/graphing-data
[8] http://www.parallax.com/product/28087
[9] http://learn.parallax.com/tutorials/language/blocklyprop/oled-display-blocklyprop
[10] http://www.parallax.com/product/28085
[11] http://www.parallax.com/product/28086
[12] https://www.parallax.com/product/27976
[13] https://www.parallax.com/product/27977
[14] https://www.parallax.com/product/27979
[15] http://www.parallax.com/product/32420D
[16] http://www.parallax.com/product/32420S
[17] https://www.parallax.com/product/32416
[18] https://learn.parallax.com/support/reference/propeller-blocklyprop-block-reference/communicate/protocols