Skip to content

Commit b1d03e2

Browse files
author
Kirk
committed
stub i text for these demo doc files
1 parent e03f1ee commit b1d03e2

File tree

3 files changed

+146
-12
lines changed

3 files changed

+146
-12
lines changed

examples/docs/ex_03_bitmaps.md

+68-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,73 @@
1-
# Example 1 - Hello
1+
# Example 3 - Bitmaps
22

3-
A simple example that demonstrates the basic steps required to draw graphics with the Qwiic OLED Library
3+
An example that shows drawing bitmaps using the SparkFun Qwiic OLED Library.
44

5-
## Getting Started
5+
**Key Demo Features**
6+
* Understanding bitmap structure
7+
* Bitmap objects
8+
* Drawing Bitmap
69

710

8-
Detailed examples are included as part of the library installation process and available in the Arduino IDE `File > Examples >` menu.
11+
## Setup
12+
13+
After installing this library in your local Arduino environment, begin with a standard Arduino sketch, and include the header file for this library.
14+
```C++
15+
// Include the SparkFun qwiic OLED Library
16+
#include <SparkFun_Qwiic_OLED.h>
17+
```
18+
The next step is to declare the object for the SparkFun qwiic OLED device used. Like most Arduino sketches, this is done at a global scope (after the include file declaration), not within the ```setup()``` or ```loop()``` functions.
19+
20+
The user selects from one of the following classes:
21+
22+
| Class | Qwiic OLED Device |
23+
| :--- | :--- |
24+
| `QwiicMicroOLED` | [SparkFun Qwiic Micro OLED ]( https://www.sparkfun.com/products/14532)|
25+
| `QwiicNarrowOLED` | [SparkFun Qwiic OLED Display (128x32) ]( https://www.sparkfun.com/products/17153)|
26+
| `QwiicTransparentOLED` | [SparkFun Transparent Graphical OLED]( https://www.sparkfun.com/products/15173)|
27+
28+
The Example code supports all of the SparkFun Qwiic OLED boards. To select the board being used, uncomment the `#define` for the demo board.
29+
30+
For this example, the Qwiic Micro OLED is used.
31+
32+
```C++
33+
#define MICRO
34+
//#define NARROW
35+
//#define TRANSPARENT
36+
```
37+
Which results in myOLED being declared as:
38+
39+
```C++
40+
QwiicMicroOLED myOLED;
41+
```
42+
## Initialization
43+
44+
In the ```setup()``` function of this sketch, like all of the SparkFun qwiic libraries, the device is initialized by calling the ```begin()``` method. This method returns a value of ```true``` on success, or ```false``` on failure.
45+
46+
```C++
47+
void setup()
48+
{
49+
50+
delay(500); //Give display time to power on
51+
52+
// Serial on!
53+
Serial.begin(115200);
54+
55+
Serial.println("\n\r-----------------------------------");
56+
57+
Serial.print("Running Example 01 on: ");
58+
Serial.println(String(deviceName));
59+
60+
// Initalize the OLED device and related graphics system
61+
if(!myOLED.begin()){
62+
63+
Serial.println(" - Device Begin Failed");
64+
while(1);
65+
}
66+
67+
Serial.println("- Begin Success");
68+
69+
```
70+
## Drawing Bitmaps
71+
72+
973

examples/docs/ex_04_text.md

+68-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,73 @@
1-
# Example 1 - Hello
1+
# Example 4 - Text
22

3-
A simple example that demonstrates the basic steps required to draw graphics with the Qwiic OLED Library
3+
An example that shows drawing bitmaps using the SparkFun Qwiic OLED Library.
44

5-
## Getting Started
5+
**Key Demo Features**
6+
* Understanding font structure and use
7+
* Drawing text
8+
* Using the Arduino `Print` functionality
69

710

8-
Detailed examples are included as part of the library installation process and available in the Arduino IDE `File > Examples >` menu.
11+
## Setup
12+
13+
After installing this library in your local Arduino environment, begin with a standard Arduino sketch, and include the header file for this library.
14+
```C++
15+
// Include the SparkFun qwiic OLED Library
16+
#include <SparkFun_Qwiic_OLED.h>
17+
```
18+
The next step is to declare the object for the SparkFun qwiic OLED device used. Like most Arduino sketches, this is done at a global scope (after the include file declaration), not within the ```setup()``` or ```loop()``` functions.
19+
20+
The user selects from one of the following classes:
21+
22+
| Class | Qwiic OLED Device |
23+
| :--- | :--- |
24+
| `QwiicMicroOLED` | [SparkFun Qwiic Micro OLED ]( https://www.sparkfun.com/products/14532)|
25+
| `QwiicNarrowOLED` | [SparkFun Qwiic OLED Display (128x32) ]( https://www.sparkfun.com/products/17153)|
26+
| `QwiicTransparentOLED` | [SparkFun Transparent Graphical OLED]( https://www.sparkfun.com/products/15173)|
27+
28+
The Example code supports all of the SparkFun Qwiic OLED boards. To select the board being used, uncomment the `#define` for the demo board.
29+
30+
For this example, the Qwiic Micro OLED is used.
31+
32+
```C++
33+
#define MICRO
34+
//#define NARROW
35+
//#define TRANSPARENT
36+
```
37+
Which results in myOLED being declared as:
38+
39+
```C++
40+
QwiicMicroOLED myOLED;
41+
```
42+
## Initialization
43+
44+
In the ```setup()``` function of this sketch, like all of the SparkFun qwiic libraries, the device is initialized by calling the ```begin()``` method. This method returns a value of ```true``` on success, or ```false``` on failure.
45+
46+
```C++
47+
void setup()
48+
{
49+
50+
delay(500); //Give display time to power on
51+
52+
// Serial on!
53+
Serial.begin(115200);
54+
55+
Serial.println("\n\r-----------------------------------");
56+
57+
Serial.print("Running Example 01 on: ");
58+
Serial.println(String(deviceName));
59+
60+
// Initalize the OLED device and related graphics system
61+
if(!myOLED.begin()){
62+
63+
Serial.println(" - Device Begin Failed");
64+
while(1);
65+
}
66+
67+
Serial.println("- Begin Success");
68+
69+
```
70+
## Drawing Text
71+
72+
973

examples/docs/ex_other.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
# Example 1 - Hello
1+
# Other Examples
22

3-
A simple example that demonstrates the basic steps required to draw graphics with the Qwiic OLED Library
3+
Descriptions of the other demos that are provided as part of the SparkFun Qwiic OLED Library.
44

5-
## Getting Started
5+
## Scroll-Flip
66

77

8-
Detailed examples are included as part of the library installation process and available in the Arduino IDE `File > Examples >` menu.
8+
9+
## Clock
10+
11+
12+
## Cube
13+
14+
## Multi
915

0 commit comments

Comments
 (0)