diff --git a/examples/SSD1306ClockDemo/SSD1306ClockDemo.ino b/examples/SSD1306ClockDemo/SSD1306ClockDemo.ino index d9b5c1a4a2849d26c501cec9c306ea9ef41255db..e9db7d645a610f8c42d857ba20a774b2fe9cd89e 100644 --- a/examples/SSD1306ClockDemo/SSD1306ClockDemo.ino +++ b/examples/SSD1306ClockDemo/SSD1306ClockDemo.ino @@ -24,19 +24,21 @@ * */ -#include <Wire.h> #include <TimeLib.h> // Include the correct display library // For a connection via I2C using Wire include #include <Wire.h> // Only needed for Arduino 1.6.5 and earlier #include "SSD1306.h" // alias for `#include "SSD1306Wire.h"` +// or #include "SH1106.h" alis for `#include "SH1106Wire.h"` // For a connection via I2C using brzo_i2c (must be installed) include // #include <brzo_i2c.h> // Only needed for Arduino 1.6.5 and earlier // #include "SSD1306Brzo.h" +// #include "SH1106Brzo.h" // For a connection via SPI include // #include <SPI.h> // Only needed for Arduino 1.6.5 and earlier // #include "SSD1306Spi.h" +// #include "SH1106SPi.h" // Include the UI lib #include "OLEDDisplayUi.h" @@ -53,14 +55,19 @@ // D2 -> DC // D8 -> CS // SSD1306Spi display(D0, D2, D8); +// or +// SH1106Spi display(D0, D2); // Initialize the OLED display using brzo_i2c // D3 -> SDA -// D4 -> SCL +// D5 -> SCL // SSD1306Brzo display(0x3c, D3, D5); +// or +// SH1106Brzo display(0x3c, D3, D5); // Initialize the OLED display using Wire library SSD1306 display(0x3c, D3, D5); +// SH1106 display(0x3c, D3, D5); OLEDDisplayUi ui ( &display ); diff --git a/examples/SSD1306DrawingDemo/SSD1306DrawingDemo.ino b/examples/SSD1306DrawingDemo/SSD1306DrawingDemo.ino index ff947900767e330bade56d1a02308ddc67160886..cf37fb0412002492388ed3d71fbb1ec58866c233 100644 --- a/examples/SSD1306DrawingDemo/SSD1306DrawingDemo.ino +++ b/examples/SSD1306DrawingDemo/SSD1306DrawingDemo.ino @@ -24,34 +24,42 @@ * */ -// Include the correct display library -// For a connection via I2C using Wire include -#include <Wire.h> // Only needed for Arduino 1.6.5 and earlier -#include "SSD1306.h" // alias for `#include "SSD1306Wire.h"` -// For a connection via I2C using brzo_i2c (must be installed) include -// #include <brzo_i2c.h> // Only needed for Arduino 1.6.5 and earlier -// #include "SSD1306Brzo.h" -// For a connection via SPI include -// #include <SPI.h> // Only needed for Arduino 1.6.5 and earlier -// #include "SSD1306Spi.h" - -// Use the corresponding display class: - -// Initialize the OLED display using SPI -// D5 -> CLK -// D7 -> MOSI (DOUT) -// D0 -> RES -// D2 -> DC -// D8 -> CS -// SSD1306Spi display(D0, D2, D8); - -// Initialize the OLED display using brzo_i2c -// D3 -> SDA -// D4 -> SCL -// SSD1306Brzo display(0x3c, D3, D5); - -// Initialize the OLED display using Wire library -SSD1306 display(0x3c, D3, D5); + // Include the correct display library + // For a connection via I2C using Wire include + #include <Wire.h> // Only needed for Arduino 1.6.5 and earlier + #include "SSD1306.h" // alias for `#include "SSD1306Wire.h"` + // or #include "SH1106.h" alis for `#include "SH1106Wire.h"` + // For a connection via I2C using brzo_i2c (must be installed) include + // #include <brzo_i2c.h> // Only needed for Arduino 1.6.5 and earlier + // #include "SSD1306Brzo.h" + // #include "SH1106Brzo.h" + // For a connection via SPI include + // #include <SPI.h> // Only needed for Arduino 1.6.5 and earlier + // #include "SSD1306Spi.h" + // #include "SH1106SPi.h" + + // Use the corresponding display class: + + // Initialize the OLED display using SPI + // D5 -> CLK + // D7 -> MOSI (DOUT) + // D0 -> RES + // D2 -> DC + // D8 -> CS + // SSD1306Spi display(D0, D2, D8); + // or + // SH1106Spi display(D0, D2); + + // Initialize the OLED display using brzo_i2c + // D3 -> SDA + // D5 -> SCL + // SSD1306Brzo display(0x3c, D3, D5); + // or + // SH1106Brzo display(0x3c, D3, D5); + + // Initialize the OLED display using Wire library + SSD1306 display(0x3c, D3, D5); + // SH1106 display(0x3c, D3, D5); // Adapted from Adafruit_SSD1306 void drawLines() { diff --git a/examples/SSD1306OTADemo/SSD1306OTADemo.ino b/examples/SSD1306OTADemo/SSD1306OTADemo.ino index 05d12af428e9c48775b1f7f96ade4a6f0e1212b2..6460ff9e4a308dffa396d0db473c6708e0c14f34 100644 --- a/examples/SSD1306OTADemo/SSD1306OTADemo.ino +++ b/examples/SSD1306OTADemo/SSD1306OTADemo.ino @@ -39,12 +39,15 @@ // For a connection via I2C using Wire include #include <Wire.h> // Only needed for Arduino 1.6.5 and earlier #include "SSD1306.h" // alias for `#include "SSD1306Wire.h"` +// or #include "SH1106.h" alis for `#include "SH1106Wire.h"` // For a connection via I2C using brzo_i2c (must be installed) include // #include <brzo_i2c.h> // Only needed for Arduino 1.6.5 and earlier // #include "SSD1306Brzo.h" +// #include "SH1106Brzo.h" // For a connection via SPI include // #include <SPI.h> // Only needed for Arduino 1.6.5 and earlier // #include "SSD1306Spi.h" +// #include "SH1106SPi.h" // Use the corresponding display class: @@ -55,14 +58,19 @@ // D2 -> DC // D8 -> CS // SSD1306Spi display(D0, D2, D8); +// or +// SH1106Spi display(D0, D2); // Initialize the OLED display using brzo_i2c // D3 -> SDA -// D4 -> SCL +// D5 -> SCL // SSD1306Brzo display(0x3c, D3, D5); +// or +// SH1106Brzo display(0x3c, D3, D5); // Initialize the OLED display using Wire library SSD1306 display(0x3c, D3, D5); +// SH1106 display(0x3c, D3, D5); void setup() { diff --git a/examples/SSD1306SimpleDemo/SSD1306SimpleDemo.ino b/examples/SSD1306SimpleDemo/SSD1306SimpleDemo.ino index 97594b95c3808ff30e459798a05e77f17fd557f5..ed7401915861f89d9a1f4dd6f697bc82b44f3069 100644 --- a/examples/SSD1306SimpleDemo/SSD1306SimpleDemo.ino +++ b/examples/SSD1306SimpleDemo/SSD1306SimpleDemo.ino @@ -23,24 +23,23 @@ * */ -#include <Wire.h> - // Include the correct display library // For a connection via I2C using Wire include #include <Wire.h> // Only needed for Arduino 1.6.5 and earlier #include "SSD1306.h" // alias for `#include "SSD1306Wire.h"` +// or #include "SH1106.h" alis for `#include "SH1106Wire.h"` // For a connection via I2C using brzo_i2c (must be installed) include // #include <brzo_i2c.h> // Only needed for Arduino 1.6.5 and earlier // #include "SSD1306Brzo.h" +// #include "SH1106Brzo.h" // For a connection via SPI include // #include <SPI.h> // Only needed for Arduino 1.6.5 and earlier // #include "SSD1306Spi.h" +// #include "SH1106SPi.h" // Include custom images #include "images.h" -// Use the corresponding display class: - // Initialize the OLED display using SPI // D5 -> CLK // D7 -> MOSI (DOUT) @@ -48,14 +47,19 @@ // D2 -> DC // D8 -> CS // SSD1306Spi display(D0, D2, D8); +// or +// SH1106Spi display(D0, D2); // Initialize the OLED display using brzo_i2c // D3 -> SDA -// D4 -> SCL +// D5 -> SCL // SSD1306Brzo display(0x3c, D3, D5); +// or +// SH1106Brzo display(0x3c, D3, D5); // Initialize the OLED display using Wire library SSD1306 display(0x3c, D3, D5); +// SH1106 display(0x3c, D3, D5); #define DEMO_DURATION 3000 diff --git a/examples/SSD1306UiDemo/SSD1306UiDemo.ino b/examples/SSD1306UiDemo/SSD1306UiDemo.ino index a51c57c6380a05785badda4d4dfc39dd90570502..31357569ff3849b6c1098165aa96f9880129327f 100644 --- a/examples/SSD1306UiDemo/SSD1306UiDemo.ino +++ b/examples/SSD1306UiDemo/SSD1306UiDemo.ino @@ -24,18 +24,19 @@ * */ -#include <Wire.h> - -// Include the correct display library -// For a connection via I2C using Wire include -#include <Wire.h> // Only needed for Arduino 1.6.5 and earlier -#include "SSD1306.h" // alias for `#include "SSD1306Wire.h"` -// For a connection via I2C using brzo_i2c (must be installed) include -// #include <brzo_i2c.h> // Only needed for Arduino 1.6.5 and earlier -// #include "SSD1306Brzo.h" -// For a connection via SPI include -// #include <SPI.h> // Only needed for Arduino 1.6.5 and earlier -// #include "SSD1306Spi.h" + // Include the correct display library + // For a connection via I2C using Wire include + #include <Wire.h> // Only needed for Arduino 1.6.5 and earlier + #include "SSD1306.h" // alias for `#include "SSD1306Wire.h"` + // or #include "SH1106.h" alis for `#include "SH1106Wire.h"` + // For a connection via I2C using brzo_i2c (must be installed) include + // #include <brzo_i2c.h> // Only needed for Arduino 1.6.5 and earlier + // #include "SSD1306Brzo.h" + // #include "SH1106Brzo.h" + // For a connection via SPI include + // #include <SPI.h> // Only needed for Arduino 1.6.5 and earlier + // #include "SSD1306Spi.h" + // #include "SH1106SPi.h" // Include the UI lib #include "OLEDDisplayUi.h" @@ -52,14 +53,19 @@ // D2 -> DC // D8 -> CS // SSD1306Spi display(D0, D2, D8); +// or +// SH1106Spi display(D0, D2); // Initialize the OLED display using brzo_i2c // D3 -> SDA -// D4 -> SCL +// D5 -> SCL // SSD1306Brzo display(0x3c, D3, D5); +// or +// SH1106Brzo display(0x3c, D3, D5); // Initialize the OLED display using Wire library SSD1306 display(0x3c, D3, D5); +// SH1106 display(0x3c, D3, D5); OLEDDisplayUi ui ( &display );