User Manual

your desktop. If this is your first time using Arduino, please review our tutorial on
installing the Arduino IDE. If you have not previously installed an Arduino library,
please check out our installation guide.
First, you'll need to download and install the SparkFun Micro OLED library. You
can install this library automatically in the Arduino IDE's Library Manager by searching
for "Micro OLED Breakout". Or you can manually download it from the GitHub
repository. Also, make sure to download the Qwiic example sketches, which we will be
reviewing in this tutorial.
Before we get started developing a sketch, let's look at the available functions of the
library.
void command(uint8_t c); --- Sends the display a command byte.
void data(uint8_t c); --- Sends the display a data byte.
void setColumnAddress(uint8_t add); --- Sets the column address.
void setPageAddress(uint8_t add); --- Sets the page address.
LCD Drawing Functions
void clear(uint8_t mode): --- Clears the screen buffer in the OLED's memory,
pass in mode = ALL to clear GDRAM in the OLED controller. Pass in mode =
PAGE to clear the screen page buffer.
void clear(uint8_t mode, uint8_t c); --- clears the screen buffer in the
OLED's memory, replaces it with a character 'c'.
void invert(boolean inv); --- Turns every black pixel white, turns all white
pixels black.
void contrast(uint8_t contrast); --- Changes the contrast value anywhere
between 0 and 255.
void display(void); --- Moves display memory to the screen to draw the image
in memory.
void setCursor(uint8_t x, uint8_t y); --- Set cursor position to (x, y).
void pixel(uint8_t x, uint8_t y); --- Draw a pixel using the current fore color
and current draw mode in the screen buffer's x,y position.
void pixel(uint8_t x, uint8_t y, uint8_t color, uint8_t mode); --- Draw a
pixel with NORM or XOR draw mode in the screen buffer's x,y position.
void line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1); --- Draw line using
current fore color and current draw mode from x0,y0 to x1,y1 of the screen buffer.
void line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t color,
uint8_t mode); --- Draw line using color and mode from x0,y0 to x1,y1 of the
screen buffer.
void lineH(uint8_t x, uint8_t y, uint8_t width); --- Draw horizontal line
using current fore color and current draw mode from x,y to x+width,y of the
screen buffer.
6/17