Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: UltraschallSensor_LowLevelV2
OLEDDisplay Class Reference
OLED Display. More...
#include <OLEDDisplay.h>
Public Member Functions | |
void | clear () |
clear Display | |
void | setRotation (uint8_t r) |
Set the display rotation, 1 = down, 2 = up, 3 = left, or 4 = right. | |
void | printf (const char *format,...) |
printf formatted with display | |
void | cursor (int16_t y, int16_t x) |
Set the text cursor location, based on the size of the text. |
Detailed Description
OLED Display.
Vereinfachte Version zur Ansteuerung eines Displays auf Basis von I2C und SSD1306 Interface
Example:
#include "mbed.h" #include "OLEDDisplay.h" DigitalOut led( D10 ); OLEDDisplay oled; int main() { int i = 0; oled.clear(); oled.printf( "Test\r\n" ); while (true) { oled.cursor( 1, 0 ); oled.printf( "ON %d, %d\n", led.read(), i ); led = 1; wait( 1.0f ); oled.cursor( 2, 0 ); oled.printf( "OFF %d, %d\n", led.read(), i ); led = 0; i++; wait( 1.0f ); } }
Definition at line 60 of file OLEDDisplay.h.
Member Function Documentation
void clear | ( | ) |
clear Display
Definition at line 68 of file OLEDDisplay.h.
void cursor | ( | int16_t | y, |
int16_t | x | ||
) |
Set the text cursor location, based on the size of the text.
Definition at line 94 of file OLEDDisplay.h.
void printf | ( | const char * | format, |
... | |||
) |
printf formatted with display
Definition at line 80 of file OLEDDisplay.h.
void setRotation | ( | uint8_t | r ) |
Set the display rotation, 1 = down, 2 = up, 3 = left, or 4 = right.
Definition at line 74 of file OLEDDisplay.h.
Generated on Sun Jul 17 2022 02:57:33 by
