SparkFunMicroOLED (community library)

Summary

Name Value
Name SparkFunMicroOLED
Version 1.3.0
Installs 116495
License GPL v3
Author Jim Lindblom jim@sparkfun.com
URL https://github.com/sparkfun/sparkfun_micro_oled_particle_library
Repository https://github.com/sparkfun/sparkfun_micro_oled_particle_library.git
Download .tar.gz
All Versions 1.3.0, 1.2.1, 1.2.0

A library to drive the SparkFun Photon Micro OLED shield.

Example Build Testing

Device OS Version:

This table is generated from an automated build. Success only indicates that the code compiled successfully.

Library Read Me

This content is provided by the library maintainer and has not been validated or approved.

SparkFun Photon Micro OLED Shield Library

Firmware library SparkFun's Photon Micro OLED Shield.

About

This is a firmware library for SparkFun's Photon Micro OLED Shield.

Photon Micro OLED Shield.

With a bit of extra setup, it'll also work with the Micro OELD Breakout.

You can use this library to draw pixels, lines, circles, squares, and text on the micro OLED's 64x48 display.

Repository Contents

  • /firmware - Source files for the library (.cpp, .h).
  • /firmware/examples - Example sketches for the library (.cpp). Run these from the Particle IDE.
  • spark.json - General library properties for the Particel library manager.

Example Usage

Include the library, declare a MicroOLED object, and set the display up with these snippets of code:

#include "SparkFunMicroOLED.h" // Include the SFE_MicroOLED library ... ////////////////////////// // MicroOLED Definition // //////////////////////////

#define PIN_RESET D7 // Connect RST to pin 7 (req. for SPI and I2C)

#define PIN_DC D3 // Connect DC to pin 3 (required for SPI)

#define PIN_CS A2 // Connect CS to pin A2 (required for SPI)

////////////////////////////////// // MicroOLED Object Declaration // ////////////////////////////////// // Declare a MicroOLED object. The parameters include: // 1 - Mode: Should be either MODE_SPI or MODE_I2C // 2 - Reset pin: Any digital pin // 3 - D/C pin: Any digital pin (SPI mode only) // 4 - CS pin: Any digital pin (SPI mode only, 10 recommended) MicroOLED oled(MODE_SPI, PIN_RESET, PIN_DC, PIN_CS); ... void setup() { oled.begin(); // Initialize the OLED oled.clear(ALL); // Clear the OLED's internal display buffer oled.display(); // Display whatever is in the firmware display buffer (SparkFun logo by default) }

Check out the example files in the examples directory for more guidance.

License Information

This product is open source!

Please review the LICENSE.md file for license information.

If you have any questions or concerns on licensing, please contact techsupport@sparkfun.com.

Distributed as-is; no warranty is given.

  • Your friends at SparkFun.

Browse Library Files