diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/404.html b/404.html new file mode 100644 index 0000000..d4fbb52 --- /dev/null +++ b/404.html @@ -0,0 +1,915 @@ + + + +
+ + + + + + + + + + + + + + + + +Methods used to support Arduino Print functionality.
+This method is called set the "cursor" position in the device. The library supports the Arduino Print
interface, enabling the use of a print()
and println()
methods. The set cursor position defines where to start text output for this functionality.
Parameter | +Type | +Description | +
---|---|---|
x | +uint8_t |
+The X coordinate of the cursor | +
y | +uint8_t |
+The Y coordinate of the cursor | +
This method is called to set the current color of the system. This is used by the Arduino Print
interface functionality
Parameter | +Type | +Description | +
---|---|---|
clr |
+uint8_t |
+The color to set. 0 = black, > 0 = white | +
This method is called to get the current color of the system. This is used by the Arduino Print
interface functionality
Parameter | +Type | +Description | +
---|---|---|
return value | +uint8_t |
+The current color | +
Methods to setup the device, get device information and change display options.
+This method is called to initialize the OLED library and connection to the OLED device. This method must be called before calling any graphics methods.
+ +Parameter | +Type | +Description | +
---|---|---|
wirePort |
+TwoWire |
+optional. The Wire port. If not provided, the default port is used | +
address |
+uint8_t |
+optional. I2C Address. If not provided, the default address is used. | +
return value | +bool |
+true on success, false on startup failure |
+
When called, this method reset the library state and OLED device to their intial state. Helpful to reset the OLED after waking up a system from a sleep state.
+ +Parameter | +Type | +Description | +
---|---|---|
return value | +bool |
+true on success, false on startup failure |
+
This method returns the width, in pixels, of the connected OLED device
+ +Parameter | +Type | +Description | +
---|---|---|
return value | +uint8_t |
+The width in pixels of the connected OLED device | +
This method returns the height, in pixels, of the connected OLED device
+ +Parameter | +Type | +Description | +
---|---|---|
return value | +uint8_t |
+The height in pixels of the connected OLED device | +
This method inverts the current graphics on the display. This results of this command happen immediatly.
+ +Parameter | +Type | +Description | +
---|---|---|
bInvert |
+bool |
+true - the screen is inverted. false - the screen is set to normal |
+
When called, the screen contents are flipped vertically if the flip parameter is true, or restored to normal display if the flip parameter is false.
+ +Parameter | +Type | +Description | +
---|---|---|
bFlip |
+bool |
+true - the screen is flipped vertically. false - the screen is set to normal |
+
When called, the screen contents are flipped horizontally if the flip parameter is true, or restored to normal display if the flip parameter is false.
+ +Parameter | +Type | +Description | +
---|---|---|
bFlip |
+bool |
+true - the screen is flipped horizontally. false - the screen is set to normal |
+
Used to turn the OLED display on or off.
+ +Parameter | +Type | +Description | +
---|---|---|
bEnable |
+bool |
+true - the OLED display is powered on (default). false - the OLED dsiplay is powered off. |
+
Methods for setting the drawing state of the library.
+This method is called to set the current font in the library. The current font is used when calling the text()
method on this device.
The default font for the device is 5x7
.
Parameter | +Type | +Description | +
---|---|---|
theFont |
+QwiicFont |
+The font to set as current in the device | +
theFont |
+QwiicFont* |
+Pointer to the font to set as current in the device. | +
For the library, fonts are added to your program by including them via include files which are part of this library.
+The following fonts are included:
+Font | +Include File | +Font Variable | +Description | +
---|---|---|---|
5x7 | +<res/qw_fnt_5x7.h> |
+QW_FONT_5X7 |
+A full, 5 x 7 font | +
31x48 | +<res/qw_fnt_31x48.h> |
+QW_FONT_31X48 |
+A full, 31 x 48 font | +
Seven Segment | +<res/qw_fnt_7segment.h> |
+QW_FONT_7SEGMENT |
+Numbers only | +
8x16 | +<res/qw_fnt_8x16.h> |
+QW_FONT_8X16 |
+A full, 8 x 16 font | +
Large Numbers | +<res/qw_fnt_largenum.h> |
+QW_FONT_LARGENUM |
+Numbers only | +
For each font, the font variables are objects with the following attributes:
+Attribute | +Value | +
---|---|
width |
+The font width in pixels | +
height |
+The font height in pixels | +
start |
+The font start character offset | +
n_chars |
+The number of characters | +
map_width |
+The width of the font map | +
Example use of a font object attribute: +
+This method returns the current font for the device.
+ +Parameter | +Type | +Description | +
---|---|---|
return value | +QwiicFont* |
+A pointer to the current font. See setFont() for font object details. |
+
This method returns the height in pixels of a provided String based on the current device font.
+ +Parameter | +Type | +Description | +
---|---|---|
return value | +String | +The name of the current font. | +
This method returns the width in pixels of a provided String based on the current device font.
+ +Parameter | +Type | +Description | +
---|---|---|
text | +String |
+The string used to determine width | +
return value | +unsigned int |
+The width of the provide string, as determined using the current font. | +
This method returns the height in pixels of a provided String based on the current device font.
+ +Parameter | +Type | +Description | +
---|---|---|
text | +String |
+The string used to determine height | +
return value | +unsigned int |
+The height of the provide string, as determined using the current font. | +
This method sets the current draw mode for the library. The draw mode determines how pixels are set on the screen during drawing operations.
+ +Parameter | +Type | +Description | +
---|---|---|
rop | +grRasterOp_t |
+The raster operation (ROP) to set the graphics system to. | +
Raster operations device how source (pixels to draw) are represented on the destination device. The available Raster Operation (ROP) codes are:
+ROP Code | +Description | +
---|---|
grROPCopy | +default Drawn pixel values are copied to the device screen | +
grROPNotCopy | +A not operation is applied to the source value before copying to screen | +
grROPNot | +A not operation is applied to the destination (screen) value | +
grROPXOR | +A XOR operation is performed between the source and destination values | +
grROPBlack | +A value of 0, or black is drawn to the destination | +
grROPWhite | +A value of 1, or black is drawn to the destination | +
This method returns the current draw mode for the library. The draw mode determines how pixels are set on the screen during drawing operations.
+ +Parameter | +Type | +Description | +
---|---|---|
return value | +grRasterOp_t |
+The current aster operation (ROP) of the graphics system. | +
Methods used to draw and display graphics.
+When called, any pending display updates are sent to the connected OLED device. This includes drawn graphics and erase commands.
+ +Parameter | +Type | +Description | +
---|---|---|
NONE | ++ | + |
Erases all graphics on the device, placing the display in a blank state. The erase update isn't sent to the device until the next display()
call on the device.
Parameter | +Type | +Description | +
---|---|---|
NONE | ++ | + |
Set the value of a pixel on the screen.
+ +Parameter | +Type | +Description | +
---|---|---|
x | +uint8_t |
+The X coordinate of the pixel to set | +
y | +uint8_t |
+The Y coordinate of the pixel to set | +
clr | +uint8_t |
+optional The color value to set the pixel. This defaults to white (1). | +
Draw a line on the screen.
+Note: If a line is horizontal (y0 = y1) or vertical (x0 = x1), optimized draw algorithms are used by the library.
+ +Parameter | +Type | +Description | +
---|---|---|
x0 | +uint8_t |
+The start X coordinate of the line | +
y0 | +uint8_t |
+The start Y coordinate of the line | +
x1 | +uint8_t |
+The end X coordinate of the line | +
y1 | +uint8_t |
+The end Y coordinate of the line | +
clr | +uint8_t |
+optional The color value to draw the line. This defaults to white (1). | +
Draw a rectangle on the screen.
+ +Parameter | +Type | +Description | +
---|---|---|
x0 | +uint8_t |
+The start X coordinate of the rectangle - upper left corner | +
y0 | +uint8_t |
+The start Y coordinate of the rectangle - upper left corner | +
width | +uint8_t |
+The width of the rectangle | +
height | +uint8_t |
+The height of the rectangle | +
clr | +uint8_t |
+optional The color value to draw the line. This defaults to white (1). | +
Draw a filled rectangle on the screen.
+ +Parameter | +Type | +Description | +
---|---|---|
x0 | +uint8_t |
+The start X coordinate of the rectangle - upper left corner | +
y0 | +uint8_t |
+The start Y coordinate of the rectangle - upper left corner | +
width | +uint8_t |
+The width of the rectangle | +
height | +uint8_t |
+The height of the rectangle | +
clr | +uint8_t |
+optional The color value to draw the line. This defaults to white (1). | +
Draw a circle on the screen.
+ +Parameter | +Type | +Description | +
---|---|---|
x0 | +uint8_t |
+The X coordinate of the circle center | +
y0 | +uint8_t |
+The Y coordinate of the circle center | +
radius | +uint8_t |
+The radius of the circle | +
clr | +uint8_t |
+optional The color value to draw the circle. This defaults to white (1). | +
Draw a filled circle on the screen.
+ +Parameter | +Type | +Description | +
---|---|---|
x0 | +uint8_t |
+The X coordinate of the circle center | +
y0 | +uint8_t |
+The Y coordinate of the circle center | +
radius | +uint8_t |
+The radius of the circle | +
clr | +uint8_t |
+optional The color value to draw the circle. This defaults to white (1). | +
Draws a bitmap on the screen.
+The bitmap should be 8 bit encoded - each pixel contains 8 y values.
+ +Parameter | +Type | +Description | +
---|---|---|
x0 | +uint8_t |
+The X coordinate to place the bitmap - upper left corner | +
y0 | +uint8_t |
+The Y coordinate to place the bitmap - upper left corner | +
pBitmap | +uint8_t * |
+A pointer to the bitmap array | +
bmp_width | +uint8_t |
+The width of the bitmap | +
bmp_height | +uint8_t |
+The height of the bitmap | +
Draws a bitmap on the screen.
+The bitmap should be 8 bit encoded - each pixel contains 8 y values.
+The coordinate [x1,y1] allows for only a portion of bitmap to be drawn.
+void bitmap(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1,
+ uint8_t *pBitmap, uint8_t bmp_width, uint8_t bmp_height )
+
Parameter | +Type | +Description | +
---|---|---|
x0 | +uint8_t |
+The X coordinate to place the bitmap - upper left corner | +
y0 | +uint8_t |
+The Y coordinate to place the bitmap - upper left corner | +
x1 | +uint8_t |
+The end X coordinate of the bitmap - lower right corner | +
y1 | +uint8_t |
+The end Y coordinate of the bitmap - lower right corner | +
pBitmap | +uint8_t * |
+A pointer to the bitmap array | +
bmp_width | +uint8_t |
+The width of the bitmap | +
bmp_height | +uint8_t |
+The height of the bitmap | +
Draws a bitmap on the screen using a Bitmap object for the bitmap data.
+ +Parameter | +Type | +Description | +
---|---|---|
x0 | +uint8_t |
+The X coordinate to place the bitmap - upper left corner | +
y0 | +uint8_t |
+The Y coordinate to place the bitmap - upper left corner | +
Bitmap | +QwiicBitmap |
+A bitmap object | +
Draws a string using the current font on the screen.
+ +Parameter | +Type | +Description | +
---|---|---|
x0 | +uint8_t |
+The X coordinate to start drawing the text | +
y0 | +uint8_t |
+The Y coordinate to start drawing the text | +
text | +const char* |
+The string to draw on the screen | +
text | +String |
+The Arduino string to draw on the screen | +
clr | +uint8_t |
+optional The color value to draw the circle. This defaults to white (1). | +
Methods for device scrolling
+If the device is in a scrolling mode, calling this method stops the scroll, and restores the device to normal display operation. This action is performed immediately.
+ +Parameter | +Type | +Description | +
---|---|---|
NONE | ++ | + |
This method is called to start the device scrolling the displayed graphics to the right. This action is performed immediately.
+The screen will scroll until the scrollStop()
method is called.
Parameter | +Type | +Description | +
---|---|---|
start |
+uint8_t |
+The start page address of the scroll - valid values are 0 thru 7 | +
stop |
+uint8_t |
+The stop/end page address of the scroll - valid values are 0 thru 7 | +
interval |
+uint8_t |
+The time interval between scroll step - values listed below | +
Defined values for the interval
parameter:
Defined Symbol | +Time Interval Between Steps | +
---|---|
SCROLL_INTERVAL_2_FRAMES |
+2 | +
SCROLL_INTERVAL_3_FRAMES |
+3 | +
SCROLL_INTERVAL_4_FRAMES |
+4 | +
SCROLL_INTERVAL_5_FRAMES |
+5 | +
SCROLL_INTERVAL_25_FRAMES |
+25 | +
SCROLL_INTERVAL_64_FRAMES |
+64 | +
SCROLL_INTERVAL_128_FRAMES |
+128 | +
SCROLL_INTERVAL_256_FRAMES |
+256 | +
This method is called to start the device scrolling the displayed graphics vertically and to the right. This action is performed immediately.
+The screen will scroll until the scrollStop()
method is called.
Parameter | +Type | +Description | +
---|---|---|
start |
+uint8_t |
+The start page address of the scroll - valid values are 0 thru 7 | +
stop |
+uint8_t |
+The stop/end page address of the scroll - valid values are 0 thru 7 | +
interval |
+uint8_t |
+The time interval between scroll step - values listed in scrollRight |
+
This method is called start to the device scrolling the displayed graphics to the left. This action is performed immediately.
+The screen will scroll until the scrollStop()
method is called.
Parameter | +Type | +Description | +
---|---|---|
start |
+uint8_t |
+The start page address of the scroll - valid values are 0 thru 7 | +
stop |
+uint8_t |
+The stop/end page address of the scroll - valid values are 0 thru 7 | +
interval |
+uint8_t |
+The time interval between scroll step - values listed in scrollRight |
+
This method is called to start the device scrolling the displayed graphics vertically and to the left. This action is performed immediately.
+The screen will scroll until the scrollStop()
method is called.
Parameter | +Type | +Description | +
---|---|---|
start |
+uint8_t |
+The start page address of the scroll - valid values are 0 thru 7 | +
stop |
+uint8_t |
+The stop/end page address of the scroll - valid values are 0 thru 7 | +
interval |
+uint8_t |
+The time interval between scroll step - values listed in scrollRight |
+
{"use strict";/*!
+ * escape-html
+ * Copyright(c) 2012-2013 TJ Holowaychuk
+ * Copyright(c) 2015 Andreas Lubbe
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
+ * MIT Licensed
+ */var Va=/["'&<>]/;qn.exports=za;function za(e){var t=""+e,r=Va.exec(t);if(!r)return t;var o,n="",i=0,s=0;for(i=r.index;i