pub struct Oled128x64Bricklet { /* private fields */ }
Expand description

3.3cm (1.3“) OLED display with 128x64 pixels

Implementations

Creates an object with the unique device ID uid. This object can then be used after the IP Connection ip_connection is connected.

Returns the response expected flag for the function specified by the function ID parameter. It is true if the function is expected to send a response, false otherwise.

For getter functions this is enabled by default and cannot be disabled, because those functions will always send a response. For callback configuration functions it is enabled by default too, but can be disabled by set_response_expected. For setter functions it is disabled by default and can be enabled.

Enabling the response expected flag for a setter function allows to detect timeouts and other error conditions calls of this setter as well. The device will then send a response for this purpose. If this flag is disabled for a setter function then no response is send and errors are silently ignored, because they cannot be detected.

See set_response_expected for the list of function ID constants available for this function.

Changes the response expected flag of the function specified by the function ID parameter. This flag can only be changed for setter (default value: false) and callback configuration functions (default value: true). For getter functions it is always enabled.

Enabling the response expected flag for a setter function allows to detect timeouts and other error conditions calls of this setter as well. The device will then send a response for this purpose. If this flag is disabled for a setter function then no response is send and errors are silently ignored, because they cannot be detected.

Changes the response expected flag for all setter and callback configuration functions of this device at once.

Appends 64 byte of data to the window as set by New Window.

Each row has a height of 8 pixels which corresponds to one byte of data.

Example: if you call New Window with column from 0 to 127 and row from 0 to 7 (the whole display) each call of Write (red arrow) will write half of a row.

.. image:: /Images/Bricklets/bricklet_oled_128x64_display.png :scale: 100 % :alt: Display pixel order :align: center :target: ../../_images/Bricklets/bricklet_oled_128x64_display.png

The LSB (D0) of each data byte is at the top and the MSB (D7) is at the bottom of the row.

The next call of Write will write the second half of the row and the next two the second row and so on. To fill the whole display you need to call Write 16 times.

Sets the window in which you can write with Write. One row has a height of 8 pixels.

The columns have a range of 0 to 127 and the rows have a range of 0 to 7.

Clears the current content of the window as set by New Window.

Sets the configuration of the display.

You can set a contrast value from 0 to 255 and you can invert the color (black/white) of the display.

The default values are contrast 143 and inverting off.

Returns the configuration as set by Set Display Configuration.

Writes text to a specific line (0 to 7) with a specific position (0 to 25). The text can have a maximum of 26 characters.

For example: (1, 10, Hello) will write Hello in the middle of the second line of the display.

You can draw to the display with Write and then add text to it afterwards.

The display uses a special 5x7 pixel charset. You can view the characters of the charset in Brick Viewer.

Returns the UID, the UID where the Bricklet is connected to, the position, the hardware and firmware version as well as the device identifier.

The position can be ‘a’, ‘b’, ‘c’ or ‘d’.

The device identifier numbers can be found here. |device_identifier_constant|

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.