Void setTimePerTransition(uint16_t time) //Set the approx. Void setTimePerFrame(uint16_t time) //Set the approx. Void setAutoTransitionBackwards() // Set the direction if the automatic transitioning Void setAutoTransitionForwards() // Set the direction if the automatic transitioning Void disableAutoTransition() // Disable automatic transition to next frame. Void enableAutoTransition() //Enable automatic transition to next frame Void setTargetFPS(uint8_t fps) //Configure the internal used target FPS a clock) that is displayed always at the same position. An Overlay on the other hand is a pieces of information (e.g. The library also provides an Indicator that will be updated accordingly. A Frame is used to provide information the default behaviour is to display a Frame for a defined time and than move to the next (like "Pages"). The Ui Library is used to provide a basic set of Ui elements called, Frames and Overlays. Available default fonts: ArialMT_Plain_10, ArialMT_Plain_16, ArialMT_Plain_24 TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER, TEXT_ALIGN_RIGHT, TEXT_ALIGN_CENTER_BOTH Void setTextAlignment(OLEDDISPLAY_TEXT_ALIGNMENT textAlignment) Convenience method for the const char version Returns the width of the const char* with the current font settings Uint16_t getStringWidth(const char* text, uint16_t length)
Text Operations: void drawString(int16_t x, int16_t y, String text) Void drawFastImage(int16_t x, int16_t y, int16_t width, int16_t height, const char *image) // Draw a bitmap in the internal image formatĬ. Void drawVerticalLine(int16_t x, int16_t y, int16_t length) // Draw a lin vertically Void drawHorizontalLine(int16_t x, int16_t y, int16_t length) // Draw a line horizontally Void drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1) // Draw a line from pos 0 to pos 1 Void setPixel(int16_t x, int16_t y) // Draw a pixel at given position Pixel Drawing void setColor(OLEDDISPLAY_COLOR color) // Sets the color of all pixel operations Void flipScreenVertically() // Turn the display upside downī. Void setContrast(char contrast) // Set display contrast Void normalDisplay(void) // Normal display mode Void invertDisplay(void) // Inverted display mode Void clear(void) // Clear the local pixel buffer
Void displayOff(void) // Turn the display offs Void displayOn(void) // Turn the display on
Void resetDisplay(void) // Cycle through the initialisation Display Control: void init() // Initialise the display The complete list can be founded at the GITHub provided above.Ī. Let's list some important API that will be used with our OLED display. The library supports I2C protocol to access the OLED display using the built in Wire.h library: #include Once you re-started the IDE, the library should be already installed.
We have use on previous projects the ACROBOT library version, but this time we will explore another one: The "ESP8266 OLED Driver for SSD1306 display" developed by Daniel Eichhorn (Make sure that you use Version 3.0.0 or bigger!).īellow the library that must be downloaded and installed on your Arduino IDE:
Once we have connected the display, let's download and install its library on our Arduino IDE.