Block description

The OLED block is used to display text, sensor values, and emojis on the OLED. You can set the contents of the block to be either custom text (a maximum of 100 characters), real-time sensor values collected from the sensors (on-board or external) connected to the board, or an emoji selected from a collection of available emojis.

App interface and usage

Type (Sensor/Text/Emoji):

Here, you can select what is to be displayed on the OLED - Sensor values or Text or Emoji.
Oled 1

Sensor:

If Sensor is selected, the parameter area expands to reveal a scrolling section for further selection.
Here, you can select the sensor whose value is to be displayed
Oled 2
You can further select the port the sensor is connected to.
Oled 3

Note:
If you use an IR sensor, you would need to additionally set the mode of operation (or sensor type) to either Analog or Digital.
If you use a temperature sensor, you would need to select the unit (°C/°F)
If you use a Sharp sensor, you would need to additionally select the Sharp sensor type (from the variant

Text:

If Text is selected, the parameter area expands to reveal a scrolling section where you can type the text to be displayed, and select the font it is to be displayed in.
Here, you can select the text box to type the text to be entered.
Oled 5

As you type the text, you can select the font style that the text is to be displayed in.
Oled 6 Oled 7

The text type is displayed in the font selected, example, Permanent Marker here.
Oled 8
Oled 8 1

Emoji:

If Emoji is selected, the parameter area expands to reveal a horizontally scrolling section where you can select the emoji of your choice.
Oled 9

Guidelines

  • Once a message is displayed on the OLED, it continues to be displayed till you use
    a blank OLED block (a block with a blank text section), a Stop block after it, or another OLED block with new text/sensor values/emojis
  • Make sure to include a reasonable delay between consecutive OLED blocks for you to be able to view them as two separate instances.
  • If the length of the text is greater than 30 characters, it is displayed in the default system font (Freemono).

Examples

  1. This code snippet displays High on the OLED when the Motion sensor detects motion. It also turns on the buzzer for 500 milliseconds.

Oled Ex 1

  1. This code snippet displays "Motion detected" when the Motion sensor detects motion. It also turns on the buzzer for 500 milliseconds.
    Oled Ex 2

  2. This code snippet displays a Snowflake emoji when the temperature (detected by the on-board Temperature sensor) drops below 5°C and also turns on the buzzer for 500 milliseconds.
    Oled Ex 3