Skip to content

Commit 8615894

Browse files
committed
Updated documentation
1 parent 8a43b71 commit 8615894

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ This is a driver for the SSD1306 based 128x64 pixel OLED display running on the
44

55
You can either download this library as a zip file and unpack it to your Arduino/libraries folder or (once it has been added) choose it from the Arduino library manager.
66

7+
## Credits
8+
Many thanks go to Fabrice Weinberg (@FWeinb) for optimizing and refactoring the UI library.
9+
The init sequence for the SSD1306 was inspired by Adafruits library for the same display.
10+
711
## Usage
812

913
The SSD1306Demo is a very comprehensive example demonstrating the most important features of the library.
@@ -24,7 +28,11 @@ The SSD1306Demo is a very comprehensive example demonstrating the most important
2428

2529
## Fonts
2630

27-
Fonts are defined in a proprietary but open format. I wrote a program that converts any TrueType font into this format. Once the code is useful enough I will publish it or make it available as Webapplication (SaaS), where you can make any font you like available to the library.
31+
Fonts are defined in a proprietary but open format. You can create new font files by choosing from a given list
32+
of open sourced Fonts from this web app: http://oleddisplay.squix.ch
33+
Choose the font family, style and size, check the preview image and if you like what you see click the "Create" button. This will create the font array in a text area form where you can copy and paste it into a new or existing header file.
34+
![FontTool](https://github.com/squix78/esp8266-oled-ssd1306/raw/master/resources/FontTool.png)
35+
2836

2937
## API
3038

@@ -84,10 +92,10 @@ void drawRect(int x, int y, int width, int height);
8492
void fillRect(int x, int y, int width, int height);
8593
8694
// Draw a bitmap with the given dimensions
87-
void drawBitmap(int x, int y, int width, int height, const char *bitmap);
95+
void drawBitmap(int x, int y, int width, int height, const char ∗bitmap);
8896
8997
// Draw an XBM image with the given dimensions
90-
void drawXbm(int x, int y, int width, int height, const char *xbm);
98+
void drawXbm(int x, int y, int width, int height, const char ∗xbm);
9199
92100
// Sets the color of all pixel operations
93101
void setColor(int color);
@@ -116,17 +124,18 @@ void setTextAlignment(int textAlignment);
116124
// Sets the current font. Available default fonts
117125
// defined in SSD1306Fonts.h:
118126
// ArialMT_Plain_10, ArialMT_Plain_16, ArialMT_Plain_24
119-
void setFont(const char *fontData);
127+
// Or create one with the font tool at http://oleddisplay.squix.ch
128+
void setFont(const char ∗fontData);
120129
```
121130
122131
## Frame Transition Functions
123132
124-
The Frane Transition functions are a set of functions on top of the basic library. They allow you to easily write frames which will be shifted in regular intervals. The frame animation (including the frame indicators) will only be activated if you define callback functions with setFrameCallacks(..). If no callback methods are defined no indicators will be displayed.
133+
The Frame Transition functions are a set of functions on top of the basic library. They allow you to easily write frames which will be shifted in regular intervals. The frame animation (including the frame indicators) will only be activated if you define callback functions with setFrameCallacks(..). If no callback methods are defined no indicators will be displayed.
125134
126135
```C++
127136
// Sets the callback methods of the format void method(x,y). As soon as you define the callbacks
128137
// the library is in "frame mode" and indicators will be drawn.
129-
void setFrameCallbacks(int frameCount, void (*frameCallbacks[])(int x, int y));
138+
void setFrameCallbacks(int frameCount, void (∗frameCallbacks[])(SSD1306 ∗display, SSD1306UiState∗ state,int x, int y));
130139
131140
// Tells the framework to move to the next tick. The
132141
// current visible frame callback will be called once

resources/FontTool.png

13.7 KB
Loading

0 commit comments

Comments
 (0)