Skip to content

Commit d351fb8

Browse files
committed
Add 1.3" contrast. Update examples
1 parent b5c4662 commit d351fb8

File tree

13 files changed

+14
-0
lines changed

13 files changed

+14
-0
lines changed

examples/Example-01_Hello/Example-01_Hello.ino

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
QwiicMicroOLED myOLED;
2929
// QwiicTransparentOLED myOLED;
3030
// QwiicNarrowOLED myOLED;
31+
// Qwiic1in3OLED myOLED;
3132

3233

3334
void setup()

examples/Example-02_Shapes/Example-02_Shapes.ino

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
QwiicMicroOLED myOLED;
3434
// QwiicTransparentOLED myOLED;
3535
// QwiicNarrowOLED myOLED;
36+
// Qwiic1in3OLED myOLED;
3637

3738
// Global variables - used to stash our screen size
3839

examples/Example-03_Bitmap/Example-03_Bitmap.ino

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
QwiicMicroOLED myOLED;
3434
// QwiicTransparentOLED myOLED;
3535
// QwiicNarrowOLED myOLED;
36+
// Qwiic1in3OLED myOLED;
3637

3738
// Let's draw a truck - use our built in bitmap
3839
#include "res/qw_bmp_truck.h"

examples/Example-04_Text/Example-04_Text.ino

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
QwiicMicroOLED myOLED;
3434
// QwiicTransparentOLED myOLED;
3535
// QwiicNarrowOLED myOLED;
36+
// Qwiic1in3OLED myOLED;
3637

3738
// Fonts
3839
#include <res/qw_fnt_5x7.h>

examples/Example-05_ScrollFlip/Example-05_ScrollFlip.ino

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
QwiicMicroOLED myOLED;
3636
// QwiicTransparentOLED myOLED;
3737
// QwiicNarrowOLED myOLED;
38+
// Qwiic1in3OLED myOLED;
3839

3940
int yoffset;
4041

examples/Example-06_Clock/Example-06_Clock.ino

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
QwiicMicroOLED myOLED;
3636
// QwiicTransparentOLED myOLED;
3737
// QwiicNarrowOLED myOLED;
38+
// Qwiic1in3OLED myOLED;
3839

3940
// Use these variables to set the initial time
4041
int hours = 11;

examples/Example-07_Cube/Example-07_Cube.ino

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
QwiicMicroOLED myOLED;
3535
// QwiicTransparentOLED myOLED;
3636
// QwiicNarrowOLED myOLED;
37+
// Qwiic1in3OLED myOLED;
3738

3839
int width;
3940
int height;

examples/Example-08_Multi/Example-08_Multi.ino

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
QwiicMicroOLED myOLED;
3535
// QwiicTransparentOLED myOLED;
3636
// QwiicNarrowOLED myOLED;
37+
// Qwiic1in3OLED myOLED;
3738

3839
int width;
3940
int height;

examples/docs/ex_01_hello.md

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ The user selects from one of the following classes:
2626
| `QwiicMicroOLED` | [SparkFun Qwiic Micro OLED ]( https://www.sparkfun.com/products/14532)|
2727
| `QwiicNarrowOLED` | [SparkFun Qwiic OLED Display (128x32) ]( https://www.sparkfun.com/products/17153)|
2828
| `QwiicTransparentOLED` | [SparkFun Transparent Graphical OLED]( https://www.sparkfun.com/products/15173)|
29+
| `Qwiic1in3OLED` | [SparkFun Qwiic OLED 1.3" Display (128x32) ]( https://www.sparkfun.com/products/23453)|
2930

3031
The Example code supports all of the SparkFun Qwiic OLED boards. To select the board being used, uncomment the `#define` for the demo board.
3132

examples/docs/ex_02_lines.md

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ The user selects from one of the following classes:
2525
| `QwiicMicroOLED` | [SparkFun Qwiic Micro OLED ]( https://www.sparkfun.com/products/14532)|
2626
| `QwiicNarrowOLED` | [SparkFun Qwiic OLED Display (128x32) ]( https://www.sparkfun.com/products/17153)|
2727
| `QwiicTransparentOLED` | [SparkFun Transparent Graphical OLED]( https://www.sparkfun.com/products/15173)|
28+
| `Qwiic1in3OLED` | [SparkFun Qwiic OLED 1.3" Display (128x32) ]( https://www.sparkfun.com/products/23453)|
2829

2930
The Example code supports all of the SparkFun Qwiic OLED boards. To select the board being used, uncomment the `#define` for the demo board.
3031

examples/docs/ex_03_bitmaps.md

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ The user selects from one of the following classes:
2525
| `QwiicMicroOLED` | [SparkFun Qwiic Micro OLED ]( https://www.sparkfun.com/products/14532)|
2626
| `QwiicNarrowOLED` | [SparkFun Qwiic OLED Display (128x32) ]( https://www.sparkfun.com/products/17153)|
2727
| `QwiicTransparentOLED` | [SparkFun Transparent Graphical OLED]( https://www.sparkfun.com/products/15173)|
28+
| `Qwiic1in3OLED` | [SparkFun Qwiic OLED 1.3" Display (128x32) ]( https://www.sparkfun.com/products/23453)|
2829

2930
The Example code supports all of the SparkFun Qwiic OLED boards. To select the board being used, uncomment the `#define` for the demo board.
3031

examples/docs/ex_04_text.md

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ The user selects from one of the following classes:
2525
| `QwiicMicroOLED` | [SparkFun Qwiic Micro OLED ]( https://www.sparkfun.com/products/14532)|
2626
| `QwiicNarrowOLED` | [SparkFun Qwiic OLED Display (128x32) ]( https://www.sparkfun.com/products/17153)|
2727
| `QwiicTransparentOLED` | [SparkFun Transparent Graphical OLED]( https://www.sparkfun.com/products/15173)|
28+
| `Qwiic1in3OLED` | [SparkFun Qwiic OLED 1.3" Display (128x32) ]( https://www.sparkfun.com/products/23453)|
2829

2930
The Example code supports all of the SparkFun Qwiic OLED boards. To select the board being used, uncomment the `#define` for the demo board.
3031

src/qwiic_oled_1in3.h

+2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
#define kOLED1in3PinConfig 0x12
6464
#define kOLED1in3PreCharge 0xF1
6565
#define kOLED1in3VCOM 0x40
66+
#define kOLED1in3Contrast 0xCF
6667

6768
#define kOLED1in3DefaultAddress 0x3D
6869
#define kOLED1in3AltAddress 0x3C
@@ -86,6 +87,7 @@ class QwOLED1in3 : public QwGrSSD1306 {
8687
setCommPins(kOLED1in3PinConfig);
8788
setPreCharge(kOLED1in3PreCharge);
8889
setVcomDeselect(kOLED1in3VCOM);
90+
setContrast(kOLED1in3Contrast);
8991

9092
// Call the super class to do all the work
9193
return this->QwGrSSD1306::init();

0 commit comments

Comments
 (0)