From ae97422d5e0b96db481706e6c31bb46a87a87805 Mon Sep 17 00:00:00 2001 From: Fabrice Weinberg <Fabrice@weinberg.me> Date: Sun, 29 May 2016 23:10:00 +0200 Subject: [PATCH] Fixes discussed in #26 --- SSD1306Brzo.h | 2 +- .../SSD1306ClockDemo/SSD1306ClockDemo.ino | 9 +++++--- .../SSD1306SimpleDemo/SSD1306SimpleDemo.ino | 9 +++++--- examples/SSD1306SimpleDemo/images.h | 22 ------------------- examples/SSD1306UiDemo/SSD1306UiDemo.ino | 9 +++++--- 5 files changed, 19 insertions(+), 32 deletions(-) diff --git a/SSD1306Brzo.h b/SSD1306Brzo.h index 8098aec..3b99d82 100644 --- a/SSD1306Brzo.h +++ b/SSD1306Brzo.h @@ -29,7 +29,7 @@ #define SSD1306Brzo_h #include "OLEDDisplay.h" -#include "brzo_i2c.h" +#include <brzo_i2c.h> #if F_CPU == 160000000L #define BRZO_I2C_SPEED 1000 diff --git a/examples/SSD1306ClockDemo/SSD1306ClockDemo.ino b/examples/SSD1306ClockDemo/SSD1306ClockDemo.ino index a093b28..94758b2 100644 --- a/examples/SSD1306ClockDemo/SSD1306ClockDemo.ino +++ b/examples/SSD1306ClockDemo/SSD1306ClockDemo.ino @@ -26,7 +26,6 @@ #include <Wire.h> #include <TimeLib.h> -#include "images.h" // Include the correct display library // For a connection via I2C using Wire include @@ -34,16 +33,20 @@ // For a connection via I2C using brzo_i2c (must be installed) include // #include "SSD1306Brzo.h" // For a connection via SPI include +// #include <SPI.h> // #include "SSD1306Spi.h" // Include the UI lib #include "OLEDDisplayUi.h" +// Include custom images +#include "images.h" + // Use the corresponding display class: // Initialize the OLED display using SPI -// D5 -> SCL -// D7 -> SDA +// D5 -> CLK +// D7 -> MOSI (DOUT) // D0 -> RES // D2 -> DC // D8 -> CS diff --git a/examples/SSD1306SimpleDemo/SSD1306SimpleDemo.ino b/examples/SSD1306SimpleDemo/SSD1306SimpleDemo.ino index 8b7b8b5..405b43f 100644 --- a/examples/SSD1306SimpleDemo/SSD1306SimpleDemo.ino +++ b/examples/SSD1306SimpleDemo/SSD1306SimpleDemo.ino @@ -24,7 +24,6 @@ */ #include <Wire.h> -#include "images.h" // Include the correct display library // For a connection via I2C using Wire include @@ -32,13 +31,17 @@ // For a connection via I2C using brzo_i2c (must be installed) include // #include "SSD1306Brzo.h" // For a connection via SPI include +// #include <SPI.h> // #include "SSD1306Spi.h" +// Include custom images +#include "images.h" + // Use the corresponding display class: // Initialize the OLED display using SPI -// D5 -> SCL -// D7 -> SDA +// D5 -> CLK +// D7 -> MOSI (DOUT) // D0 -> RES // D2 -> DC // D8 -> CS diff --git a/examples/SSD1306SimpleDemo/images.h b/examples/SSD1306SimpleDemo/images.h index 8b876a3..9daf8c1 100644 --- a/examples/SSD1306SimpleDemo/images.h +++ b/examples/SSD1306SimpleDemo/images.h @@ -26,25 +26,3 @@ const char WiFi_Logo_bits[] PROGMEM = { 0x00, 0x00, 0x80, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; - -const char activeSymbol[] PROGMEM = { - B00000000, - B00000000, - B00011000, - B00100100, - B01000010, - B01000010, - B00100100, - B00011000 -}; - -const char inactiveSymbol[] PROGMEM = { - B00000000, - B00000000, - B00000000, - B00000000, - B00011000, - B00011000, - B00000000, - B00000000 -}; diff --git a/examples/SSD1306UiDemo/SSD1306UiDemo.ino b/examples/SSD1306UiDemo/SSD1306UiDemo.ino index edf198f..9102d32 100644 --- a/examples/SSD1306UiDemo/SSD1306UiDemo.ino +++ b/examples/SSD1306UiDemo/SSD1306UiDemo.ino @@ -25,7 +25,6 @@ */ #include <Wire.h> -#include "images.h" // Include the correct display library // For a connection via I2C using Wire include @@ -33,17 +32,21 @@ // For a connection via I2C using brzo_i2c (must be installed) include // #include "SSD1306Brzo.h" // For a connection via SPI include +// #include <SPI.h> // #include "SSD1306Spi.h" // Include the UI lib #include "OLEDDisplayUi.h" +// Include custom images +#include "images.h" + // Use the corresponding display class: // Initialize the OLED display using SPI -// D5 -> SCL -// D7 -> SDA +// D5 -> CLK +// D7 -> MOSI (DOUT) // D0 -> RES // D2 -> DC // D8 -> CS -- GitLab