sparkfun / SparkFun_Micro_OLED_Arduino_Library

Arduino library for the SparkFun Micro OLED - a breakout board for a monochrome, 0.66", 64x48 OLED display.
Other
83 stars 60 forks source link
arduino-library oled oled-display

SparkFun Micro OLED Breakout Arduino Library

SparkFun Micro OLED Breakout SparkFun Micro OLED Breakout (Qwiic)
SparkFun Micro OLED Breakout (LCD-13003) SparkFun Micro OLED Breakout (Qwiic)

An Arduino library that allows you to draw shapes and text on the Micro OLED display and Qwiic micro OLED breakout.

Repository Contents

Documentation

Products that use this Library

Contributing

If you would like to contribute to this library: please do, we truly appreciate it, but please follow these guidelines. Thanks!

MicroOLED: Version 1.3 - A New Hope

Prior to version 1.3, this library was hard-wired to the Wire I2C and SPI ports. Version 1.3 allows alternate ports to be used, in a way which is backward-compatible with the previous versions.

We have of course tested the new code, but if you do notice any compatibility issues please raise an issue.

I2C Example

Prior to v1.3, you would have used:

#define DC_JUMPER 1
MicroOLED oled(PIN_RESET, DC_JUMPER); // I2C declaration

followed by:

oled.begin();    // Initialize the OLED

From v1.3.0, you can still do it that way, or can do it like this:

MicroOLED oled(PIN_RESET); // The TwoWire I2C port is passed to .begin instead

followed by:

oled.begin(0x3D, Wire);    // Initialize the OLED using address 0x3D and the Wire port

To use a non-standard address or port, you can call:

oled.begin(0x3C, Qwiic);    // Initialize the OLED using address 0x3C and the Qwiic port

Please see this example for more details.

SPI Example

For SPI in v1.3, you still need to instantiate the oled using:

MicroOLED oled(PIN_RESET, PIN_DC, PIN_CS); //SPI declaration

If you want to use SPI as the SPIClass, then you can continue to call:

  oled.begin();    // Initialize the OLED

To use a non-standard port, call:

  oled.begin(SPI1);    // Initialize the OLED using SPI1

Please see this example for more details.

Version History

License Information

This product is open source!

Please see LICENSE.md for more information.

Distributed as-is; no warranty is given.