Compare commits

...

88 Commits

Author SHA1 Message Date
Jörg Deckert 3c4bde3d3d new function load1b to restore bitmap to framebuffer after deep sleep 2020-10-25 11:07:49 +01:00
David Zovko 75e37670a3
Add Linux instructions 2020-10-25 09:10:00 +01:00
Nitko Nitkić 3ebd4f6dd3
Merge pull request #42 from e-radionicacom/revision
Added Arduino IDE metadata files
2020-10-22 00:03:42 +02:00
nitko12 e296f4b2a4 Merge branch 'revision' of https://github.com/e-radionicacom/Inkplate-6-Arduino-library into revision 2020-10-22 00:02:37 +02:00
nitko12 2d58aae366 Added Arduino IDE files. 2020-10-22 00:02:24 +02:00
Nitko Nitkić 4b00737b13
Merge pull request #41 from e-radionicacom/revision
Merging with slave mode renamed to peripheral
2020-10-19 10:31:01 +02:00
Nitko Nitkić 6cc00d4840
Merge branch 'master' into revision 2020-10-19 10:30:49 +02:00
nitko12 9e06e3517a Merge branch 'revision' of https://github.com/e-radionicacom/Inkplate-6-Arduino-library into revision 2020-10-18 14:37:42 +02:00
nitko12 4087e5e4d0 Renamed Slave to Peripheral mode. 2020-10-18 14:37:30 +02:00
David Zovko ff4ad5a80f
Update README.md 2020-10-14 09:21:17 +02:00
David Zovko ab1e2f73c0 This revision branch rewrites the whole Inkplate library into more structured file organization. Many methods and functionality have been added, especially the ones handling the image drawing. Modes are renamed from Monochrome and Greyscale to B&W and Grey.
Detailed overview of new features can be found while browsing commits.
2020-10-14 09:02:27 +02:00
nitko12 ef1a7f79b6 fixed code format on last commit + added partial test. 2020-10-12 10:20:53 +02:00
David Zovko db13f1e581
Update 2-Inkplate_basic_grayscale.ino 2020-10-11 20:05:59 +02:00
BornaBiro fc268c7655 Fixed panel stuck bug, fixed power up/down bug
- There was a bug in power up sequence that was causing Inkplate to stuck in refresh, due to do/while loop.
Bad power up also caused partial updat to not work properly.
- Now temperature measurment is not dependent to screen refresh. Now you can read temperature from Inkplate built-in sensor anytime you want! Because of that, macros for powering up/down TPS65186 are moved from Inkplate.cpp to defines.h
- Removed unused functions and variables for gamma correction
- Improved cleaning (little bit slower, but better)
2020-10-08 01:52:32 +02:00
nitko12 b6781dd127 Fixed portrait mode bug. 2020-09-26 12:39:31 +02:00
nitko12 3c9398ca33 Fix font not loading. 2020-09-24 11:47:39 +02:00
nitko12 cb57141976 Added default info header. 2020-09-24 10:43:08 +02:00
nitko12 7a40b54df1 Merged web and sd jpeg and bmpimage examples. 2020-09-24 09:56:23 +02:00
nitko12 c30df6ee78 Renamed and tweaked examples. 2020-09-24 09:38:01 +02:00
nitko12 2f753f20d2 Added comments. 2020-09-23 15:11:48 +02:00
nitko12 de0e62c932 Added Spotify example. 2020-09-23 14:55:41 +02:00
nitko12 9dd1ff14a2 Removed credentials. 2020-09-21 15:23:30 +02:00
nitko12 1e635111d0 Fixed double freeing. 2020-09-21 15:21:25 +02:00
nitko12 a17e1e0c69 Added maze example + fixes. 2020-09-21 13:24:50 +02:00
BornaBiro e16f608d31 Power up/power down bug fix., clean, new HW seq
- Fixed epaper power up / power down bug that caused problems on some epaper panels (random vertical black lines). Some informations on how to properly pwr up/down TPS65186 Epaper PMIC is missing in datasheet.
- Better cleaning (for some reason, whilte color can easly "overcharge" screen, so now the are less white frames than black ones). [This problem is visible if the panel is refreshed multiple times in a row, screen after has been powerd down starts to fade]
- Improved HW sequence (there was some issue with line clock and start pulse vertical signal)
- Removed vscan_write() function (it's not needed anymore).
- Some minor bug fixes
2020-09-21 00:07:28 +02:00
nitko12 48bee38bca Removed credentials. 2020-09-18 10:34:12 +02:00
nitko12 c91f4224a2 Added full drawImage tests. 2020-09-18 10:29:20 +02:00
nitko12 1fd65df81b Added PNG and, adding tests. 2020-09-18 10:16:14 +02:00
nitko12 57a406f57a Renamed monochrome -> BW and grayscale -> gray. 2020-09-16 11:55:51 +02:00
nitko12 49367f07ba Added class inheritence image 2020-09-15 14:07:49 +02:00
nitko12 3f04f9756d Minor fixes, deprecation mark. 2020-09-15 14:01:22 +02:00
nitko12 933be84808 Reglobalised sd card object. 2020-09-15 08:37:15 +02:00
nitko12 cb5c74138b Png support start 2020-09-14 15:44:57 +02:00
nitko12 615f3b939c Better polygon drawing. 2020-09-14 12:07:34 +02:00
nitko12 54fde8bf42 Community project Game of Life additions. 2020-09-11 13:35:43 +02:00
nitko12 69f244b557 fixed untracked files 2020-09-11 13:34:39 +02:00
nitko12 23e3925fb3 Merge branch 'claud9999-community_contributions' into revision 2020-09-11 13:20:42 +02:00
nitko12 0a81a0ce78 Merge branch 'community_contributions' of https://github.com/claud9999/Inkplate-6-Arduino-library into claud9999-community_contributions 2020-09-11 13:20:01 +02:00
nitko12 8c4303180b Example fix. 2020-09-11 12:28:42 +02:00
nitko12 35a4ea4ef0 Merge branch 'revision' of ../Inkplate-revision into revision 2020-09-11 10:29:30 +02:00
nitko12 9ced239578 remove old files 2020-09-11 10:28:25 +02:00
nitko12 4687d67162 Reintegrated Adafruit-GFX-Library. 2020-09-11 09:35:36 +02:00
Chris Knight 52e71bfb63 draft proposal for community-contributed programs 2020-09-10 20:34:38 -07:00
nitko12 4df80297ea Added drawImage method. 2020-09-10 15:22:56 +02:00
nitko12 573b16bce1 Added jpeg tests. 2020-09-10 13:50:09 +02:00
nitko12 2ba755e9b2 Jpeg dither added. 2020-09-10 13:17:24 +02:00
nitko12 6fd0a07186 GFX to Graphics rename. 2020-09-10 08:11:12 +02:00
nitko12 c7e0781d21 Partial speed up. 2020-09-10 08:04:45 +02:00
nitko12 82a082003a Added bmp dither. 2020-09-09 14:18:37 +02:00
Nitko Nitkić e5ca63391a
Rename Untitled Diagram.drawio to Image Flowchart.drawio 2020-09-09 10:29:29 +02:00
nitko12 d15bdc43d7 Merge branch 'master' of https://github.com/nitko12/Inkplate-revision 2020-09-09 10:28:10 +02:00
nitko12 557cae9cc7 Adding tests. 2020-09-09 10:27:49 +02:00
Nitko Nitkić f99d753377 Update Untitled Diagram.drawio 2020-09-09 09:14:49 +02:00
Nitko Nitkić 8db282b750 Image Flow.drawio 2020-09-08 16:04:42 +02:00
nitko12 6fd572b52f Few new fixes. 2020-09-07 15:34:51 +02:00
David Zovko c31a1253c6
Update README.md 2020-09-07 11:49:47 +02:00
David Zovko 63fb00f56c Update README.md 2020-09-07 11:47:50 +02:00
David Zovko c9c2031c66 Add working library for all displays 2020-09-07 11:46:29 +02:00
nitko12 5d94d15672 First commit. 2020-09-07 11:40:01 +02:00
nitko12 0e2cc2b4d7 first commit 2020-09-07 11:38:43 +02:00
David Zovko aea5753b94 Update Adafruit_MCP23017.cpp 2020-09-07 11:34:16 +02:00
David Zovko 357fadc00e Replace master branch with older version to fix compatibility with all screens 2020-09-07 11:34:11 +02:00
David Zovko d23f8217e6
Update slave part usage 2020-09-01 17:46:44 +02:00
David Zovko 00bea50110
Fix error 2020-09-01 14:43:10 +02:00
David Zovko c726f2a309 Finish enumeration 2020-09-01 13:23:31 +02:00
David Zovko 11acf80436 Improve numbering of examples 2020-09-01 13:00:51 +02:00
David Zovko 27222558df Change numberation of examples 2020-09-01 12:58:32 +02:00
David Zovko 420075a1e9
Merge pull request #30 from Thorinair/master
Added JPEG support for SD and Web
2020-09-01 12:51:41 +02:00
David Zovko 9693bcb9ae
Merge pull request #29 from nitko12/master
Added touch wake up example
2020-09-01 12:50:57 +02:00
Thorinair 0fe94b5867 Add invert support, add dither starter 2020-08-31 14:07:56 +02:00
Thorinair cef06b82d6 Add web JPEG support 2020-08-31 13:35:30 +02:00
nitko12 cf9a1f16a5 Added deep sleep touch pad wake up. 2020-08-31 13:16:27 +02:00
Thorinair e904398dca Clean up example 2020-08-31 13:11:08 +02:00
Thorinair 1cdda39072 Rename Web BPM example 2020-08-31 12:58:57 +02:00
nitko12 530788d895 Merged official. 2020-08-30 20:27:32 +02:00
Thorinair 4db9a74db1 Initial jpeg support 2020-08-30 20:23:13 +02:00
David Zovko fab5d93332
Add official documentation link 2020-08-30 17:15:35 +02:00
nitko12 36c857a4be Possible fix 2020-08-28 10:19:56 +02:00
David Zovko bd9d1e838d
Merge pull request #24 from ddd-mtl/patch-1
Fix typo in Network.cpp
2020-08-28 08:55:00 +02:00
damien bf3f598440
Update Network.cpp
typo fix
2020-08-27 19:59:09 -04:00
BornaBiro a1578bed16 Removed Adafruit MCP23017 Library
- Removed Adafruit MCP23017 library. Instead, code for controlling MCP23017 is built into library and it uses memory buffer to store all registers data from MCP23017. MCP23017 is now working much faster.
- Example for MCP23017 is changed
- Code for cleaning screen is improved (no more weird black/white lines outside visible aread, which can affect picture quality)
- Better waveform for grayscale (better color pallete), no more weird gradient on one color.
- Improved monochrome mode (writing black color was to aggressive, hard to clean)
2020-08-27 10:48:26 +02:00
David Zovko cb5e49da2c
Update README.md 2020-08-26 10:32:04 +02:00
David Zovko 9bff038099
Merge pull request #23 from nitko12/master
Added polygon triangulation and drawing + elipse
2020-08-26 10:17:55 +02:00
nitko12 1e46770afc Merge https://github.com/e-radionicacom/Inkplate-6-Arduino-library 2020-08-26 09:43:28 +02:00
nitko12 31a31fb4e8 Fixed monochrome example 2. 2020-08-26 09:27:02 +02:00
nitko12 e275a357e8 Fixed monochrome example. 2020-08-26 09:25:10 +02:00
nitko12 1e434d6b60 Added elipse + examples. 2020-08-26 09:22:16 +02:00
nitko12 a0d91f1004 Polygon drawing, untested. 2020-08-25 15:53:09 +02:00
535 changed files with 66252 additions and 9959 deletions

3
.gitignore vendored
View File

@ -1,3 +1,6 @@
.clang-format
.vscode/
build/
examples/.DS_Store
.DS_Store

File diff suppressed because it is too large Load Diff

View File

@ -1,353 +0,0 @@
#ifndef _ADAFRUIT_GFX_H
#define _ADAFRUIT_GFX_H
#if ARDUINO >= 100
#include "Arduino.h"
#include "Print.h"
#else
#include "WProgram.h"
#endif
#include "gfxfont.h"
/// A generic graphics superclass that can handle all sorts of drawing. At a minimum you can subclass and provide drawPixel(). At a maximum you can do a ton of overriding to optimize. Used for any/all Adafruit displays!
class Adafruit_GFX : public Print {
public:
Adafruit_GFX(int16_t w, int16_t h); // Constructor
// This MUST be defined by the subclass:
virtual void drawPixel(int16_t x, int16_t y, uint16_t color) = 0; ///< Virtual drawPixel() function to draw to the screen/framebuffer/etc, must be overridden in subclass. @param x X coordinate. @param y Y coordinate. @param color 16-bit pixel color.
// TRANSACTION API / CORE DRAW API
// These MAY be overridden by the subclass to provide device-specific
// optimized code. Otherwise 'generic' versions are used.
virtual void startWrite(void);
virtual void writePixel(int16_t x, int16_t y, uint16_t color);
virtual void writeFillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color);
virtual void writeFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
virtual void writeFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
virtual void writeLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color);
virtual void endWrite(void);
// CONTROL API
// These MAY be overridden by the subclass to provide device-specific
// optimized code. Otherwise 'generic' versions are used.
virtual void setRotation(uint8_t r);
virtual void invertDisplay(boolean i);
// BASIC DRAW API
// These MAY be overridden by the subclass to provide device-specific
// optimized code. Otherwise 'generic' versions are used.
virtual void
// It's good to implement those, even if using transaction API
drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color),
drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color),
fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color),
fillScreen(uint16_t color),
// Optional and probably not necessary to change
drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color),
drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color);
// These exist only with Adafruit_GFX (no subclass overrides)
void
drawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color),
drawCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t cornername,
uint16_t color),
fillCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color),
fillCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t cornername,
int16_t delta, uint16_t color),
drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1,
int16_t x2, int16_t y2, uint16_t color),
fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1,
int16_t x2, int16_t y2, uint16_t color),
drawRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h,
int16_t radius, uint16_t color),
fillRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h,
int16_t radius, uint16_t color),
drawBitmap(int16_t x, int16_t y, const uint8_t bitmap[],
int16_t w, int16_t h, uint16_t color),
drawBitmap(int16_t x, int16_t y, const uint8_t bitmap[],
int16_t w, int16_t h, uint16_t color, uint16_t bg),
drawBitmap(int16_t x, int16_t y, uint8_t *bitmap,
int16_t w, int16_t h, uint16_t color),
drawBitmap(int16_t x, int16_t y, uint8_t *bitmap,
int16_t w, int16_t h, uint16_t color, uint16_t bg),
drawXBitmap(int16_t x, int16_t y, const uint8_t bitmap[],
int16_t w, int16_t h, uint16_t color),
drawGrayscaleBitmap(int16_t x, int16_t y, const uint8_t bitmap[],
int16_t w, int16_t h),
drawGrayscaleBitmap(int16_t x, int16_t y, uint8_t *bitmap,
int16_t w, int16_t h),
drawGrayscaleBitmap(int16_t x, int16_t y,
const uint8_t bitmap[], const uint8_t mask[],
int16_t w, int16_t h),
drawGrayscaleBitmap(int16_t x, int16_t y,
uint8_t *bitmap, uint8_t *mask, int16_t w, int16_t h),
drawRGBBitmap(int16_t x, int16_t y, const uint16_t bitmap[],
int16_t w, int16_t h),
drawRGBBitmap(int16_t x, int16_t y, uint16_t *bitmap,
int16_t w, int16_t h),
drawRGBBitmap(int16_t x, int16_t y,
const uint16_t bitmap[], const uint8_t mask[],
int16_t w, int16_t h),
drawRGBBitmap(int16_t x, int16_t y,
uint16_t *bitmap, uint8_t *mask, int16_t w, int16_t h),
drawChar(int16_t x, int16_t y, unsigned char c, uint16_t color,
uint16_t bg, uint8_t size),
drawChar(int16_t x, int16_t y, unsigned char c, uint16_t color,
uint16_t bg, uint8_t size_x, uint8_t size_y),
getTextBounds(const char *string, int16_t x, int16_t y,
int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h),
getTextBounds(const __FlashStringHelper *s, int16_t x, int16_t y,
int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h),
getTextBounds(const String &str, int16_t x, int16_t y,
int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h),
setTextSize(uint8_t s),
setTextSize(uint8_t sx, uint8_t sy),
setFont(const GFXfont *f = NULL);
/**********************************************************************/
/*!
@brief Set text cursor location
@param x X coordinate in pixels
@param y Y coordinate in pixels
*/
/**********************************************************************/
void setCursor(int16_t x, int16_t y) { cursor_x = x; cursor_y = y; }
/**********************************************************************/
/*!
@brief Set text font color with transparant background
@param c 16-bit 5-6-5 Color to draw text with
@note For 'transparent' background, background and foreground
are set to same color rather than using a separate flag.
*/
/**********************************************************************/
void setTextColor(uint16_t c) { textcolor = textbgcolor = c; }
/**********************************************************************/
/*!
@brief Set text font color with custom background color
@param c 16-bit 5-6-5 Color to draw text with
@param bg 16-bit 5-6-5 Color to draw background/fill with
*/
/**********************************************************************/
void setTextColor(uint16_t c, uint16_t bg) {
textcolor = c;
textbgcolor = bg;
}
/**********************************************************************/
/*!
@brief Set whether text that is too long for the screen width should
automatically wrap around to the next line (else clip right).
@param w true for wrapping, false for clipping
*/
/**********************************************************************/
void setTextWrap(boolean w) { wrap = w; }
/**********************************************************************/
/*!
@brief Enable (or disable) Code Page 437-compatible charset.
There was an error in glcdfont.c for the longest time -- one
character (#176, the 'light shade' block) was missing -- this
threw off the index of every character that followed it.
But a TON of code has been written with the erroneous
character indices. By default, the library uses the original
'wrong' behavior and old sketches will still work. Pass
'true' to this function to use correct CP437 character values
in your code.
@param x true = enable (new behavior), false = disable (old behavior)
*/
/**********************************************************************/
void cp437(boolean x=true) { _cp437 = x; }
#if ARDUINO >= 100
virtual size_t write(uint8_t);
#else
virtual void write(uint8_t);
#endif
/************************************************************************/
/*!
@brief Get width of the display, accounting for current rotation
@returns Width in pixels
*/
/************************************************************************/
int16_t width(void) const { return _width; };
/************************************************************************/
/*!
@brief Get height of the display, accounting for current rotation
@returns Height in pixels
*/
/************************************************************************/
int16_t height(void) const { return _height; }
/************************************************************************/
/*!
@brief Get rotation setting for display
@returns 0 thru 3 corresponding to 4 cardinal rotations
*/
/************************************************************************/
uint8_t getRotation(void) const { return rotation; }
// get current cursor position (get rotation safe maximum values,
// using: width() for x, height() for y)
/************************************************************************/
/*!
@brief Get text cursor X location
@returns X coordinate in pixels
*/
/************************************************************************/
int16_t getCursorX(void) const { return cursor_x; }
/************************************************************************/
/*!
@brief Get text cursor Y location
@returns Y coordinate in pixels
*/
/************************************************************************/
int16_t getCursorY(void) const { return cursor_y; };
protected:
void
charBounds(char c, int16_t *x, int16_t *y,
int16_t *minx, int16_t *miny, int16_t *maxx, int16_t *maxy);
int16_t
WIDTH, ///< This is the 'raw' display width - never changes
HEIGHT; ///< This is the 'raw' display height - never changes
int16_t
_width, ///< Display width as modified by current rotation
_height, ///< Display height as modified by current rotation
cursor_x, ///< x location to start print()ing text
cursor_y; ///< y location to start print()ing text
uint16_t
textcolor, ///< 16-bit background color for print()
textbgcolor; ///< 16-bit text color for print()
uint8_t
textsize_x, ///< Desired magnification in X-axis of text to print()
textsize_y, ///< Desired magnification in Y-axis of text to print()
rotation; ///< Display rotation (0 thru 3)
boolean
wrap, ///< If set, 'wrap' text at right edge of display
_cp437; ///< If set, use correct CP437 charset (default is off)
GFXfont
*gfxFont; ///< Pointer to special font
};
/// A simple drawn button UI element
class Adafruit_GFX_Button {
public:
Adafruit_GFX_Button(void);
// "Classic" initButton() uses center & size
void initButton(Adafruit_GFX *gfx, int16_t x, int16_t y,
uint16_t w, uint16_t h, uint16_t outline, uint16_t fill,
uint16_t textcolor, char *label, uint8_t textsize);
void initButton(Adafruit_GFX *gfx, int16_t x, int16_t y,
uint16_t w, uint16_t h, uint16_t outline, uint16_t fill,
uint16_t textcolor, char *label, uint8_t textsize_x, uint8_t textsize_y);
// New/alt initButton() uses upper-left corner & size
void initButtonUL(Adafruit_GFX *gfx, int16_t x1, int16_t y1,
uint16_t w, uint16_t h, uint16_t outline, uint16_t fill,
uint16_t textcolor, char *label, uint8_t textsize);
void initButtonUL(Adafruit_GFX *gfx, int16_t x1, int16_t y1,
uint16_t w, uint16_t h, uint16_t outline, uint16_t fill,
uint16_t textcolor, char *label, uint8_t textsize_x, uint8_t textsize_y);
void drawButton(boolean inverted = false);
boolean contains(int16_t x, int16_t y);
/**********************************************************************/
/*!
@brief Sets button state, should be done by some touch function
@param p True for pressed, false for not.
*/
/**********************************************************************/
void press(boolean p) { laststate = currstate; currstate = p; }
boolean justPressed();
boolean justReleased();
/**********************************************************************/
/*!
@brief Query whether the button is currently pressed
@returns True if pressed
*/
/**********************************************************************/
boolean isPressed(void) { return currstate; };
private:
Adafruit_GFX *_gfx;
int16_t _x1, _y1; // Coordinates of top-left corner
uint16_t _w, _h;
uint8_t _textsize_x;
uint8_t _textsize_y;
uint16_t _outlinecolor, _fillcolor, _textcolor;
char _label[10];
boolean currstate, laststate;
};
/// A GFX 1-bit canvas context for graphics
class GFXcanvas1 : public Adafruit_GFX {
public:
GFXcanvas1(uint16_t w, uint16_t h);
~GFXcanvas1(void);
void drawPixel(int16_t x, int16_t y, uint16_t color),
fillScreen(uint16_t color);
/**********************************************************************/
/*!
@brief Get a pointer to the internal buffer memory
@returns A pointer to the allocated buffer
*/
/**********************************************************************/
uint8_t *getBuffer(void) const { return buffer; }
private:
uint8_t *buffer;
};
/// A GFX 8-bit canvas context for graphics
class GFXcanvas8 : public Adafruit_GFX {
public:
GFXcanvas8(uint16_t w, uint16_t h);
~GFXcanvas8(void);
void drawPixel(int16_t x, int16_t y, uint16_t color),
fillScreen(uint16_t color),
writeFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
/**********************************************************************/
/*!
@brief Get a pointer to the internal buffer memory
@returns A pointer to the allocated buffer
*/
/**********************************************************************/
uint8_t *getBuffer(void) const { return buffer; }
private:
uint8_t *buffer;
};
/// A GFX 16-bit canvas context for graphics
class GFXcanvas16 : public Adafruit_GFX {
public:
GFXcanvas16(uint16_t w, uint16_t h);
~GFXcanvas16(void);
void drawPixel(int16_t x, int16_t y, uint16_t color),
fillScreen(uint16_t color),
byteSwap(void);
/**********************************************************************/
/*!
@brief Get a pointer to the internal buffer memory
@returns A pointer to the allocated buffer
*/
/**********************************************************************/
uint16_t *getBuffer(void) const { return buffer; }
private:
uint16_t *buffer;
};
#endif // _ADAFRUIT_GFX_H

View File

@ -1,284 +0,0 @@
/***************************************************
This is a library for the MCP23017 i2c port expander
These displays use I2C to communicate, 2 pins are required to
interface
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/
#include <Wire.h>
#ifdef __AVR
#include <avr/pgmspace.h>
#elif defined(ESP8266)
#include <pgmspace.h>
#endif
#include "Adafruit_MCP23017.h"
#if ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
// minihelper to keep Arduino backward compatibility
static inline void wiresend(uint8_t x) {
#if ARDUINO >= 100
Wire.write((uint8_t) x);
#else
Wire.send(x);
#endif
}
static inline uint8_t wirerecv(void) {
#if ARDUINO >= 100
return Wire.read();
#else
return Wire.receive();
#endif
}
/**
* Bit number associated to a give Pin
*/
uint8_t Adafruit_MCP23017::bitForPin(uint8_t pin){
return pin%8;
}
/**
* Register address, port dependent, for a given PIN
*/
uint8_t Adafruit_MCP23017::regForPin(uint8_t pin, uint8_t portAaddr, uint8_t portBaddr){
return(pin<8) ?portAaddr:portBaddr;
}
/**
* Reads a given register
*/
uint8_t Adafruit_MCP23017::readRegister(uint8_t addr){
// read the current GPINTEN
Wire.beginTransmission(MCP23017_ADDRESS | i2caddr);
wiresend(addr);
Wire.endTransmission();
Wire.requestFrom(MCP23017_ADDRESS | i2caddr, 1);
return wirerecv();
}
/**
* Writes a given register
*/
void Adafruit_MCP23017::writeRegister(uint8_t regAddr, uint8_t regValue){
// Write the register
Wire.beginTransmission(MCP23017_ADDRESS | i2caddr);
wiresend(regAddr);
wiresend(regValue);
Wire.endTransmission();
}
/**
* Helper to update a single bit of an A/B register.
* - Reads the current register value
* - Writes the new register value
*/
void Adafruit_MCP23017::updateRegisterBit(uint8_t pin, uint8_t pValue, uint8_t portAaddr, uint8_t portBaddr) {
uint8_t regValue;
uint8_t regAddr=regForPin(pin,portAaddr,portBaddr);
uint8_t bit=bitForPin(pin);
regValue = readRegister(regAddr);
// set the value for the particular bit
bitWrite(regValue,bit,pValue);
writeRegister(regAddr,regValue);
}
////////////////////////////////////////////////////////////////////////////////
/**
* Initializes the MCP23017 given its HW selected address, see datasheet for Address selection.
*/
void Adafruit_MCP23017::begin(uint8_t addr) {
if (addr > 7) {
addr = 7;
}
i2caddr = addr;
Wire.begin();
// set defaults!
// all inputs on port A and B
writeRegister(MCP23017_IODIRA,0xff);
writeRegister(MCP23017_IODIRB,0xff);
}
/**
* Initializes the default MCP23017, with 000 for the configurable part of the address
*/
void Adafruit_MCP23017::begin(void) {
begin(0);
}
/**
* Sets the pin mode to either INPUT or OUTPUT
*/
void Adafruit_MCP23017::pinMode(uint8_t p, uint8_t d) {
updateRegisterBit(p,(d==INPUT),MCP23017_IODIRA,MCP23017_IODIRB);
}
/**
* Reads all 16 pins (port A and B) into a single 16 bits variable.
*/
uint16_t Adafruit_MCP23017::readGPIOAB() {
uint16_t ba = 0;
uint8_t a;
// read the current GPIO output latches
Wire.beginTransmission(MCP23017_ADDRESS | i2caddr);
wiresend(MCP23017_GPIOA);
Wire.endTransmission();
Wire.requestFrom(MCP23017_ADDRESS | i2caddr, 2);
a = wirerecv();
ba = wirerecv();
ba <<= 8;
ba |= a;
return ba;
}
/**
* Read a single port, A or B, and return its current 8 bit value.
* Parameter b should be 0 for GPIOA, and 1 for GPIOB.
*/
uint8_t Adafruit_MCP23017::readGPIO(uint8_t b) {
// read the current GPIO output latches
Wire.beginTransmission(MCP23017_ADDRESS | i2caddr);
if (b == 0)
wiresend(MCP23017_GPIOA);
else {
wiresend(MCP23017_GPIOB);
}
Wire.endTransmission();
Wire.requestFrom(MCP23017_ADDRESS | i2caddr, 1);
return wirerecv();
}
/**
* Writes all the pins in one go. This method is very useful if you are implementing a multiplexed matrix and want to get a decent refresh rate.
*/
void Adafruit_MCP23017::writeGPIOAB(uint16_t ba) {
Wire.beginTransmission(MCP23017_ADDRESS | i2caddr);
wiresend(MCP23017_GPIOA);
wiresend(ba & 0xFF);
wiresend(ba >> 8);
Wire.endTransmission();
}
void Adafruit_MCP23017::digitalWrite(uint8_t pin, uint8_t d) {
uint8_t gpio;
uint8_t bit=bitForPin(pin);
// read the current GPIO output latches
uint8_t regAddr=regForPin(pin,MCP23017_OLATA,MCP23017_OLATB);
gpio = readRegister(regAddr);
// set the pin and direction
bitWrite(gpio,bit,d);
// write the new GPIO
regAddr=regForPin(pin,MCP23017_GPIOA,MCP23017_GPIOB);
writeRegister(regAddr,gpio);
}
void Adafruit_MCP23017::pullUp(uint8_t p, uint8_t d) {
updateRegisterBit(p,d,MCP23017_GPPUA,MCP23017_GPPUB);
}
uint8_t Adafruit_MCP23017::digitalRead(uint8_t pin) {
uint8_t bit=bitForPin(pin);
uint8_t regAddr=regForPin(pin,MCP23017_GPIOA,MCP23017_GPIOB);
return (readRegister(regAddr) >> bit) & 0x1;
}
/**
* Configures the interrupt system. both port A and B are assigned the same configuration.
* Mirroring will OR both INTA and INTB pins.
* Opendrain will set the INT pin to value or open drain.
* polarity will set LOW or HIGH on interrupt.
* Default values after Power On Reset are: (false,flase, LOW)
* If you are connecting the INTA/B pin to arduino 2/3, you should configure the interupt handling as FALLING with
* the default configuration.
*/
void Adafruit_MCP23017::setupInterrupts(uint8_t mirroring, uint8_t openDrain, uint8_t polarity){
// configure the port A
uint8_t ioconfValue=readRegister(MCP23017_IOCONA);
bitWrite(ioconfValue,6,mirroring);
bitWrite(ioconfValue,2,openDrain);
bitWrite(ioconfValue,1,polarity);
writeRegister(MCP23017_IOCONA,ioconfValue);
// Configure the port B
ioconfValue=readRegister(MCP23017_IOCONB);
bitWrite(ioconfValue,6,mirroring);
bitWrite(ioconfValue,2,openDrain);
bitWrite(ioconfValue,1,polarity);
writeRegister(MCP23017_IOCONB,ioconfValue);
}
/**
* Set's up a pin for interrupt. uses arduino MODEs: CHANGE, FALLING, RISING.
*
* Note that the interrupt condition finishes when you read the information about the port / value
* that caused the interrupt or you read the port itself. Check the datasheet can be confusing.
*
*/
void Adafruit_MCP23017::setupInterruptPin(uint8_t pin, uint8_t mode) {
// set the pin interrupt control (0 means change, 1 means compare against given value);
updateRegisterBit(pin,(mode!=CHANGE),MCP23017_INTCONA,MCP23017_INTCONB);
// if the mode is not CHANGE, we need to set up a default value, different value triggers interrupt
// In a RISING interrupt the default value is 0, interrupt is triggered when the pin goes to 1.
// In a FALLING interrupt the default value is 1, interrupt is triggered when pin goes to 0.
updateRegisterBit(pin,(mode==FALLING),MCP23017_DEFVALA,MCP23017_DEFVALB);
// enable the pin for interrupt
updateRegisterBit(pin,HIGH,MCP23017_GPINTENA,MCP23017_GPINTENB);
}
uint8_t Adafruit_MCP23017::getLastInterruptPin(){
uint8_t intf;
// try port A
intf=readRegister(MCP23017_INTFA);
for(int i=0;i<8;i++) if (bitRead(intf,i)) return i;
// try port B
intf=readRegister(MCP23017_INTFB);
for(int i=0;i<8;i++) if (bitRead(intf,i)) return i+8;
return MCP23017_INT_ERR;
}
uint8_t Adafruit_MCP23017::getLastInterruptPinValue(){
uint8_t intPin=getLastInterruptPin();
if(intPin!=MCP23017_INT_ERR){
uint8_t intcapreg=regForPin(intPin,MCP23017_INTCAPA,MCP23017_INTCAPB);
uint8_t bit=bitForPin(intPin);
return (readRegister(intcapreg)>>bit) & (0x01);
}
return MCP23017_INT_ERR;
}

View File

@ -1,84 +0,0 @@
/***************************************************
This is a library for the MCP23017 i2c port expander
These displays use I2C to communicate, 2 pins are required to
interface
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/
#ifndef _Adafruit_MCP23017_H_
#define _Adafruit_MCP23017_H_
// Don't forget the Wire library
class Adafruit_MCP23017 {
public:
void begin(uint8_t addr);
void begin(void);
void pinMode(uint8_t p, uint8_t d);
void digitalWrite(uint8_t p, uint8_t d);
void pullUp(uint8_t p, uint8_t d);
uint8_t digitalRead(uint8_t p);
void writeGPIOAB(uint16_t);
uint16_t readGPIOAB();
uint8_t readGPIO(uint8_t b);
void setupInterrupts(uint8_t mirroring, uint8_t open, uint8_t polarity);
void setupInterruptPin(uint8_t p, uint8_t mode);
uint8_t getLastInterruptPin();
uint8_t getLastInterruptPinValue();
private:
uint8_t i2caddr;
uint8_t bitForPin(uint8_t pin);
uint8_t regForPin(uint8_t pin, uint8_t portAaddr, uint8_t portBaddr);
uint8_t readRegister(uint8_t addr);
void writeRegister(uint8_t addr, uint8_t value);
/**
* Utility private method to update a register associated with a pin (whether port A/B)
* reads its value, updates the particular bit, and writes its value.
*/
void updateRegisterBit(uint8_t p, uint8_t pValue, uint8_t portAaddr, uint8_t portBaddr);
};
#define MCP23017_ADDRESS 0x20
// registers
#define MCP23017_IODIRA 0x00
#define MCP23017_IPOLA 0x02
#define MCP23017_GPINTENA 0x04
#define MCP23017_DEFVALA 0x06
#define MCP23017_INTCONA 0x08
#define MCP23017_IOCONA 0x0A
#define MCP23017_GPPUA 0x0C
#define MCP23017_INTFA 0x0E
#define MCP23017_INTCAPA 0x10
#define MCP23017_GPIOA 0x12
#define MCP23017_OLATA 0x14
#define MCP23017_IODIRB 0x01
#define MCP23017_IPOLB 0x03
#define MCP23017_GPINTENB 0x05
#define MCP23017_DEFVALB 0x07
#define MCP23017_INTCONB 0x09
#define MCP23017_IOCONB 0x0B
#define MCP23017_GPPUB 0x0D
#define MCP23017_INTFB 0x0F
#define MCP23017_INTCAPB 0x11
#define MCP23017_GPIOB 0x13
#define MCP23017_OLATB 0x15
#define MCP23017_INT_ERR 255
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,518 +0,0 @@
/*!
* @file Adafruit_SPITFT.h
*
* Part of Adafruit's GFX graphics library. Originally this class was
* written to handle a range of color TFT displays connected via SPI,
* but over time this library and some display-specific subclasses have
* mutated to include some color OLEDs as well as parallel-interfaced
* displays. The name's been kept for the sake of older code.
*
* Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing
* products from Adafruit!
*
* Written by Limor "ladyada" Fried for Adafruit Industries,
* with contributions from the open source community.
*
* BSD license, all text here must be included in any redistribution.
*/
#ifndef _ADAFRUIT_SPITFT_H_
#define _ADAFRUIT_SPITFT_H_
#if !defined(__AVR_ATtiny85__) // Not for ATtiny, at all
#include <SPI.h>
#include "Adafruit_GFX.h"
// HARDWARE CONFIG ---------------------------------------------------------
#if defined(__AVR__)
typedef uint8_t ADAGFX_PORT_t; ///< PORT values are 8-bit
#define USE_FAST_PINIO ///< Use direct PORT register access
#elif defined(ARDUINO_STM32_FEATHER) // WICED
typedef class HardwareSPI SPIClass; ///< SPI is a bit odd on WICED
typedef uint32_t ADAGFX_PORT_t; ///< PORT values are 32-bit
#elif defined(__arm__)
#if defined(ARDUINO_ARCH_SAMD)
// Adafruit M0, M4
typedef uint32_t ADAGFX_PORT_t; ///< PORT values are 32-bit
#define USE_FAST_PINIO ///< Use direct PORT register access
#define HAS_PORT_SET_CLR ///< PORTs have set & clear registers
#elif defined(CORE_TEENSY)
// PJRC Teensy 4.x
#if defined(__IMXRT1052__) || defined(__IMXRT1062__) // Teensy 4.x
typedef uint32_t ADAGFX_PORT_t; ///< PORT values are 32-bit
// PJRC Teensy 3.x
#else
typedef uint8_t ADAGFX_PORT_t; ///< PORT values are 8-bit
#endif
#define USE_FAST_PINIO ///< Use direct PORT register access
#define HAS_PORT_SET_CLR ///< PORTs have set & clear registers
#else
// Arduino Due?
typedef uint32_t ADAGFX_PORT_t; ///< PORT values are 32-bit
// USE_FAST_PINIO not available here (yet)...Due has a totally different
// GPIO register set and will require some changes elsewhere (e.g. in
// constructors especially).
#endif
#else // !ARM
// Probably ESP8266 or ESP32. USE_FAST_PINIO is not available here (yet)
// but don't worry about it too much...the digitalWrite() implementation
// on these platforms is reasonably efficient and already RAM-resident,
// only gotcha then is no parallel connection support for now.
typedef uint32_t ADAGFX_PORT_t; ///< PORT values are 32-bit
#endif // end !ARM
typedef volatile ADAGFX_PORT_t* PORTreg_t; ///< PORT register type
#if defined(__AVR__)
#define DEFAULT_SPI_FREQ 8000000L ///< Hardware SPI default speed
#else
#define DEFAULT_SPI_FREQ 16000000L ///< Hardware SPI default speed
#endif
#if defined(ADAFRUIT_PYPORTAL) || defined(ADAFRUIT_PYBADGE_M4_EXPRESS) || defined(ADAFRUIT_PYGAMER_M4_EXPRESS) || defined(ADAFRUIT_HALLOWING_M4_EXPRESS)
#define USE_SPI_DMA ///< Auto DMA if using PyPortal
#else
//#define USE_SPI_DMA ///< If set, use DMA if available
#endif
// Another "oops" name -- this now also handles parallel DMA.
// If DMA is enabled, Arduino sketch MUST #include <Adafruit_ZeroDMA.h>
// Estimated RAM usage:
// 4 bytes/pixel on display major axis + 8 bytes/pixel on minor axis,
// e.g. 320x240 pixels = 320 * 4 + 240 * 8 = 3,200 bytes.
#if !defined(ARDUINO_ARCH_SAMD)
#undef USE_SPI_DMA ///< DMA currently for SAMD chips only
#endif
#if defined(USE_SPI_DMA)
#include <Adafruit_ZeroDMA.h>
#endif
// This is kind of a kludge. Needed a way to disambiguate the software SPI
// and parallel constructors via their argument lists. Originally tried a
// bool as the first argument to the parallel constructor (specifying 8-bit
// vs 16-bit interface) but the compiler regards this as equivalent to an
// integer and thus still ambiguous. SO...the parallel constructor requires
// an enumerated type as the first argument: tft8 (for 8-bit parallel) or
// tft16 (for 16-bit)...even though 16-bit isn't fully implemented or tested
// and might never be, still needed that disambiguation from soft SPI.
enum tftBusWidth { tft8bitbus, tft16bitbus }; ///< For first arg to parallel constructor
// CLASS DEFINITION --------------------------------------------------------
/*!
@brief Adafruit_SPITFT is an intermediary class between Adafruit_GFX
and various hardware-specific subclasses for different displays.
It handles certain operations that are common to a range of
displays (address window, area fills, etc.). Originally these were
all color TFT displays interfaced via SPI, but it's since expanded
to include color OLEDs and parallel-interfaced TFTs. THE NAME HAS
BEEN KEPT TO AVOID BREAKING A LOT OF SUBCLASSES AND EXAMPLE CODE.
Many of the class member functions similarly live on with names
that don't necessarily accurately describe what they're doing,
again to avoid breaking a lot of other code. If in doubt, read
the comments.
*/
class Adafruit_SPITFT : public Adafruit_GFX {
public:
// CONSTRUCTORS --------------------------------------------------------
// Software SPI constructor: expects width & height (at default rotation
// setting 0), 4 signal pins (cs, dc, mosi, sclk), 2 optional pins
// (reset, miso). cs argument is required but can be -1 if unused --
// rather than moving it to the optional arguments, it was done this way
// to avoid breaking existing code (-1 option was a later addition).
Adafruit_SPITFT(uint16_t w, uint16_t h,
int8_t cs, int8_t dc, int8_t mosi, int8_t sck,
int8_t rst = -1, int8_t miso = -1);
// Hardware SPI constructor using the default SPI port: expects width &
// height (at default rotation setting 0), 2 signal pins (cs, dc),
// optional reset pin. cs is required but can be -1 if unused -- rather
// than moving it to the optional arguments, it was done this way to
// avoid breaking existing code (-1 option was a later addition).
Adafruit_SPITFT(uint16_t w, uint16_t h,
int8_t cs, int8_t dc, int8_t rst = -1);
#if !defined(ESP8266) // See notes in .cpp
// Hardware SPI constructor using an arbitrary SPI peripheral: expects
// width & height (rotation 0), SPIClass pointer, 2 signal pins (cs, dc)
// and optional reset pin. cs is required but can be -1 if unused.
Adafruit_SPITFT(uint16_t w, uint16_t h, SPIClass *spiClass,
int8_t cs, int8_t dc, int8_t rst = -1);
#endif // end !ESP8266
// Parallel constructor: expects width & height (rotation 0), flag
// indicating whether 16-bit (true) or 8-bit (false) interface, 3 signal
// pins (d0, wr, dc), 3 optional pins (cs, rst, rd). 16-bit parallel
// isn't even fully implemented but the 'wide' flag was added as a
// required argument to avoid ambiguity with other constructors.
Adafruit_SPITFT(uint16_t w, uint16_t h, tftBusWidth busWidth,
int8_t d0, int8_t wr, int8_t dc,
int8_t cs = -1, int8_t rst = -1, int8_t rd = -1);
// CLASS MEMBER FUNCTIONS ----------------------------------------------
// These first two functions MUST be declared by subclasses:
/*!
@brief Display-specific initialization function.
@param freq SPI frequency, in hz (or 0 for default or unused).
*/
virtual void begin(uint32_t freq) = 0;
/*!
@brief Set up the specific display hardware's "address window"
for subsequent pixel-pushing operations.
@param x Leftmost pixel of area to be drawn (MUST be within
display bounds at current rotation setting).
@param y Topmost pixel of area to be drawn (MUST be within
display bounds at current rotation setting).
@param w Width of area to be drawn, in pixels (MUST be >0 and,
added to x, within display bounds at current rotation).
@param h Height of area to be drawn, in pixels (MUST be >0 and,
added to x, within display bounds at current rotation).
*/
virtual void setAddrWindow(
uint16_t x, uint16_t y, uint16_t w, uint16_t h) = 0;
// Remaining functions do not need to be declared in subclasses
// unless they wish to provide hardware-specific optimizations.
// Brief comments here...documented more thoroughly in .cpp file.
// Subclass' begin() function invokes this to initialize hardware.
// freq=0 to use default SPI speed. spiMode must be one of the SPI_MODEn
// values defined in SPI.h, which are NOT the same as 0 for SPI_MODE0,
// 1 for SPI_MODE1, etc...use ONLY the SPI_MODEn defines! Only!
// Name is outdated (interface may be parallel) but for compatibility:
void initSPI(uint32_t freq = 0, uint8_t spiMode = SPI_MODE0);
// Chip select and/or hardware SPI transaction start as needed:
void startWrite(void);
// Chip deselect and/or hardware SPI transaction end as needed:
void endWrite(void);
void sendCommand(uint8_t commandByte, uint8_t *dataBytes = NULL, uint8_t numDataBytes = 0);
void sendCommand(uint8_t commandByte, const uint8_t *dataBytes, uint8_t numDataBytes);
uint8_t readcommand8(uint8_t commandByte, uint8_t index = 0);
// These functions require a chip-select and/or SPI transaction
// around them. Higher-level graphics primitives might start a
// single transaction and then make multiple calls to these functions
// (e.g. circle or text rendering might make repeated lines or rects)
// before ending the transaction. It's more efficient than starting a
// transaction every time.
void writePixel(int16_t x, int16_t y, uint16_t color);
void writePixels(uint16_t *colors, uint32_t len,
bool block=true, bool bigEndian=false);
void writeColor(uint16_t color, uint32_t len);
void writeFillRect(int16_t x, int16_t y, int16_t w, int16_t h,
uint16_t color);
void writeFastHLine(int16_t x, int16_t y, int16_t w,
uint16_t color);
void writeFastVLine(int16_t x, int16_t y, int16_t h,
uint16_t color);
// This is a new function, similar to writeFillRect() except that
// all arguments MUST be onscreen, sorted and clipped. If higher-level
// primitives can handle their own sorting/clipping, it avoids repeating
// such operations in the low-level code, making it potentially faster.
// CALLING THIS WITH UNCLIPPED OR NEGATIVE VALUES COULD BE DISASTROUS.
inline void writeFillRectPreclipped(int16_t x, int16_t y,
int16_t w, int16_t h, uint16_t color);
// Another new function, companion to the new non-blocking
// writePixels() variant.
void dmaWait(void);
// These functions are similar to the 'write' functions above, but with
// a chip-select and/or SPI transaction built-in. They're typically used
// solo -- that is, as graphics primitives in themselves, not invoked by
// higher-level primitives (which should use the functions above).
void drawPixel(int16_t x, int16_t y, uint16_t color);
void fillRect(int16_t x, int16_t y, int16_t w, int16_t h,
uint16_t color);
void drawFastHLine(int16_t x, int16_t y, int16_t w,
uint16_t color);
void drawFastVLine(int16_t x, int16_t y, int16_t h,
uint16_t color);
// A single-pixel push encapsulated in a transaction. I don't think
// this is used anymore (BMP demos might've used it?) but is provided
// for backward compatibility, consider it deprecated:
void pushColor(uint16_t color);
using Adafruit_GFX::drawRGBBitmap; // Check base class first
void drawRGBBitmap(int16_t x, int16_t y,
uint16_t *pcolors, int16_t w, int16_t h);
void invertDisplay(bool i);
uint16_t color565(uint8_t r, uint8_t g, uint8_t b);
// Despite parallel additions, function names kept for compatibility:
void spiWrite(uint8_t b); // Write single byte as DATA
void writeCommand(uint8_t cmd); // Write single byte as COMMAND
uint8_t spiRead(void); // Read single byte of data
// Most of these low-level functions were formerly macros in
// Adafruit_SPITFT_Macros.h. Some have been made into inline functions
// to avoid macro mishaps. Despite the addition of code for a parallel
// display interface, the names have been kept for backward
// compatibility (some subclasses may be invoking these):
void SPI_WRITE16(uint16_t w); // Not inline
void SPI_WRITE32(uint32_t l); // Not inline
// Old code had both a spiWrite16() function and SPI_WRITE16 macro
// in addition to the SPI_WRITE32 macro. The latter two have been
// made into functions here, and spiWrite16() removed (use SPI_WRITE16()
// instead). It looks like most subclasses had gotten comfortable with
// SPI_WRITE16 and SPI_WRITE32 anyway so those names were kept rather
// than the less-obnoxious camelcase variants, oh well.
// Placing these functions entirely in the class definition inlines
// them implicitly them while allowing their use in other code:
/*!
@brief Set the chip-select line HIGH. Does NOT check whether CS pin
is set (>=0), that should be handled in calling function.
Despite function name, this is used even if the display
connection is parallel.
*/
void SPI_CS_HIGH(void) {
#if defined(USE_FAST_PINIO)
#if defined(HAS_PORT_SET_CLR)
#if defined(KINETISK)
*csPortSet = 1;
#else // !KINETISK
*csPortSet = csPinMask;
#endif // end !KINETISK
#else // !HAS_PORT_SET_CLR
*csPort |= csPinMaskSet;
#endif // end !HAS_PORT_SET_CLR
#else // !USE_FAST_PINIO
digitalWrite(_cs, HIGH);
#endif // end !USE_FAST_PINIO
}
/*!
@brief Set the chip-select line LOW. Does NOT check whether CS pin
is set (>=0), that should be handled in calling function.
Despite function name, this is used even if the display
connection is parallel.
*/
void SPI_CS_LOW(void) {
#if defined(USE_FAST_PINIO)
#if defined(HAS_PORT_SET_CLR)
#if defined(KINETISK)
*csPortClr = 1;
#else // !KINETISK
*csPortClr = csPinMask;
#endif // end !KINETISK
#else // !HAS_PORT_SET_CLR
*csPort &= csPinMaskClr;
#endif // end !HAS_PORT_SET_CLR
#else // !USE_FAST_PINIO
digitalWrite(_cs, LOW);
#endif // end !USE_FAST_PINIO
}
/*!
@brief Set the data/command line HIGH (data mode).
*/
void SPI_DC_HIGH(void) {
#if defined(USE_FAST_PINIO)
#if defined(HAS_PORT_SET_CLR)
#if defined(KINETISK)
*dcPortSet = 1;
#else // !KINETISK
*dcPortSet = dcPinMask;
#endif // end !KINETISK
#else // !HAS_PORT_SET_CLR
*dcPort |= dcPinMaskSet;
#endif // end !HAS_PORT_SET_CLR
#else // !USE_FAST_PINIO
digitalWrite(_dc, HIGH);
#endif // end !USE_FAST_PINIO
}
/*!
@brief Set the data/command line LOW (command mode).
*/
void SPI_DC_LOW(void) {
#if defined(USE_FAST_PINIO)
#if defined(HAS_PORT_SET_CLR)
#if defined(KINETISK)
*dcPortClr = 1;
#else // !KINETISK
*dcPortClr = dcPinMask;
#endif // end !KINETISK
#else // !HAS_PORT_SET_CLR
*dcPort &= dcPinMaskClr;
#endif // end !HAS_PORT_SET_CLR
#else // !USE_FAST_PINIO
digitalWrite(_dc, LOW);
#endif // end !USE_FAST_PINIO
}
protected:
// A few more low-level member functions -- some may have previously
// been macros. Shouldn't have a need to access these externally, so
// they've been moved to the protected section. Additionally, they're
// declared inline here and the code is in the .cpp file, since outside
// code doesn't need to see these.
inline void SPI_MOSI_HIGH(void);
inline void SPI_MOSI_LOW(void);
inline void SPI_SCK_HIGH(void);
inline void SPI_SCK_LOW(void);
inline bool SPI_MISO_READ(void);
inline void SPI_BEGIN_TRANSACTION(void);
inline void SPI_END_TRANSACTION(void);
inline void TFT_WR_STROBE(void); // Parallel interface write strobe
inline void TFT_RD_HIGH(void); // Parallel interface read high
inline void TFT_RD_LOW(void); // Parallel interface read low
// CLASS INSTANCE VARIABLES --------------------------------------------
// Here be dragons! There's a big union of three structures here --
// one each for hardware SPI, software (bitbang) SPI, and parallel
// interfaces. This is to save some memory, since a display's connection
// will be only one of these. The order of some things is a little weird
// in an attempt to get values to align and pack better in RAM.
#if defined(USE_FAST_PINIO)
#if defined(HAS_PORT_SET_CLR)
PORTreg_t csPortSet; ///< PORT register for chip select SET
PORTreg_t csPortClr; ///< PORT register for chip select CLEAR
PORTreg_t dcPortSet; ///< PORT register for data/command SET
PORTreg_t dcPortClr; ///< PORT register for data/command CLEAR
#else // !HAS_PORT_SET_CLR
PORTreg_t csPort; ///< PORT register for chip select
PORTreg_t dcPort; ///< PORT register for data/command
#endif // end HAS_PORT_SET_CLR
#endif // end USE_FAST_PINIO
#if defined(__cplusplus) && (__cplusplus >= 201100)
union {
#endif
struct { // Values specific to HARDWARE SPI:
SPIClass *_spi; ///< SPI class pointer
#if defined(SPI_HAS_TRANSACTION)
SPISettings settings; ///< SPI transaction settings
#else
uint32_t _freq; ///< SPI bitrate (if no SPI transactions)
#endif
uint32_t _mode; ///< SPI data mode (transactions or no)
} hwspi; ///< Hardware SPI values
struct { // Values specific to SOFTWARE SPI:
#if defined(USE_FAST_PINIO)
PORTreg_t misoPort; ///< PORT (PIN) register for MISO
#if defined(HAS_PORT_SET_CLR)
PORTreg_t mosiPortSet; ///< PORT register for MOSI SET
PORTreg_t mosiPortClr; ///< PORT register for MOSI CLEAR
PORTreg_t sckPortSet; ///< PORT register for SCK SET
PORTreg_t sckPortClr; ///< PORT register for SCK CLEAR
#if !defined(KINETISK)
ADAGFX_PORT_t mosiPinMask; ///< Bitmask for MOSI
ADAGFX_PORT_t sckPinMask; ///< Bitmask for SCK
#endif // end !KINETISK
#else // !HAS_PORT_SET_CLR
PORTreg_t mosiPort; ///< PORT register for MOSI
PORTreg_t sckPort; ///< PORT register for SCK
ADAGFX_PORT_t mosiPinMaskSet; ///< Bitmask for MOSI SET (OR)
ADAGFX_PORT_t mosiPinMaskClr; ///< Bitmask for MOSI CLEAR (AND)
ADAGFX_PORT_t sckPinMaskSet; ///< Bitmask for SCK SET (OR bitmask)
ADAGFX_PORT_t sckPinMaskClr; ///< Bitmask for SCK CLEAR (AND)
#endif // end HAS_PORT_SET_CLR
#if !defined(KINETISK)
ADAGFX_PORT_t misoPinMask; ///< Bitmask for MISO
#endif // end !KINETISK
#endif // end USE_FAST_PINIO
int8_t _mosi; ///< MOSI pin #
int8_t _miso; ///< MISO pin #
int8_t _sck; ///< SCK pin #
} swspi; ///< Software SPI values
struct { // Values specific to 8-bit parallel:
#if defined(USE_FAST_PINIO)
#if defined(__IMXRT1052__) || defined(__IMXRT1062__) // Teensy 4.x
volatile uint32_t *writePort; ///< PORT register for DATA WRITE
volatile uint32_t *readPort; ///< PORT (PIN) register for DATA READ
#else
volatile uint8_t *writePort; ///< PORT register for DATA WRITE
volatile uint8_t *readPort; ///< PORT (PIN) register for DATA READ
#endif
#if defined(HAS_PORT_SET_CLR)
// Port direction register pointers are always 8-bit regardless of
// PORTreg_t -- even if 32-bit port, we modify a byte-aligned 8 bits.
#if defined(__IMXRT1052__) || defined(__IMXRT1062__) // Teensy 4.x
volatile uint32_t *dirSet; ///< PORT byte data direction SET
volatile uint32_t *dirClr; ///< PORT byte data direction CLEAR
#else
volatile uint8_t *dirSet; ///< PORT byte data direction SET
volatile uint8_t *dirClr; ///< PORT byte data direction CLEAR
#endif
PORTreg_t wrPortSet; ///< PORT register for write strobe SET
PORTreg_t wrPortClr; ///< PORT register for write strobe CLEAR
PORTreg_t rdPortSet; ///< PORT register for read strobe SET
PORTreg_t rdPortClr; ///< PORT register for read strobe CLEAR
#if !defined(KINETISK)
ADAGFX_PORT_t wrPinMask; ///< Bitmask for write strobe
#endif // end !KINETISK
ADAGFX_PORT_t rdPinMask; ///< Bitmask for read strobe
#else // !HAS_PORT_SET_CLR
// Port direction register pointer is always 8-bit regardless of
// PORTreg_t -- even if 32-bit port, we modify a byte-aligned 8 bits.
volatile uint8_t *portDir; ///< PORT direction register
PORTreg_t wrPort; ///< PORT register for write strobe
PORTreg_t rdPort; ///< PORT register for read strobe
ADAGFX_PORT_t wrPinMaskSet; ///< Bitmask for write strobe SET (OR)
ADAGFX_PORT_t wrPinMaskClr; ///< Bitmask for write strobe CLEAR (AND)
ADAGFX_PORT_t rdPinMaskSet; ///< Bitmask for read strobe SET (OR)
ADAGFX_PORT_t rdPinMaskClr; ///< Bitmask for read strobe CLEAR (AND)
#endif // end HAS_PORT_SET_CLR
#endif // end USE_FAST_PINIO
int8_t _d0; ///< Data pin 0 #
int8_t _wr; ///< Write strobe pin #
int8_t _rd; ///< Read strobe pin # (or -1)
bool wide = 0; ///< If true, is 16-bit interface
} tft8; ///< Parallel interface settings
#if defined(__cplusplus) && (__cplusplus >= 201100)
}; ///< Only one interface is active
#endif
#if defined(USE_SPI_DMA) // Used by hardware SPI and tft8
Adafruit_ZeroDMA dma; ///< DMA instance
DmacDescriptor *dptr = NULL; ///< 1st descriptor
DmacDescriptor *descriptor = NULL; ///< Allocated descriptor list
uint16_t *pixelBuf[2]; ///< Working buffers
uint16_t maxFillLen; ///< Max pixels per DMA xfer
uint16_t lastFillColor = 0; ///< Last color used w/fill
uint32_t lastFillLen = 0; ///< # of pixels w/last fill
uint8_t onePixelBuf; ///< For hi==lo fill
#endif
#if defined(USE_FAST_PINIO)
#if defined(HAS_PORT_SET_CLR)
#if !defined(KINETISK)
ADAGFX_PORT_t csPinMask; ///< Bitmask for chip select
ADAGFX_PORT_t dcPinMask; ///< Bitmask for data/command
#endif // end !KINETISK
#else // !HAS_PORT_SET_CLR
ADAGFX_PORT_t csPinMaskSet; ///< Bitmask for chip select SET (OR)
ADAGFX_PORT_t csPinMaskClr; ///< Bitmask for chip select CLEAR (AND)
ADAGFX_PORT_t dcPinMaskSet; ///< Bitmask for data/command SET (OR)
ADAGFX_PORT_t dcPinMaskClr; ///< Bitmask for data/command CLEAR (AND)
#endif // end HAS_PORT_SET_CLR
#endif // end USE_FAST_PINIO
uint8_t connection; ///< TFT_HARD_SPI, TFT_SOFT_SPI, etc.
int8_t _rst; ///< Reset pin # (or -1)
int8_t _cs; ///< Chip select pin # (or -1)
int8_t _dc; ///< Data/command pin #
int16_t _xstart = 0; ///< Internal framebuffer X offset
int16_t _ystart = 0; ///< Internal framebuffer Y offset
uint8_t invertOnCommand = 0; ///< Command to enable invert mode
uint8_t invertOffCommand = 0; ///< Command to disable invert mode
uint32_t _freq = 0; ///< Dummy var to keep subclasses happy
};
#endif // end __AVR_ATtiny85__
#endif // end _ADAFRUIT_SPITFT_H_

View File

@ -1,6 +0,0 @@
// THIS FILE INTENTIONALLY LEFT BLANK.
// Macros previously #defined here have been made into (mostly) inline
// functions in the Adafruit_SPITFT class. Other libraries might still
// contain code trying to #include this header file, so until everything's
// updated this file still exists (but doing nothing) to avoid trouble.

File diff suppressed because it is too large Load Diff

View File

@ -1,258 +0,0 @@
#ifndef __INKPLATE_H__
#define __INKPLATE_H__
#if ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#ifndef ARDUINO_ESP32_DEV
#error "Wrong board selected! Select ESP32 Wrover from board menu!"
#endif
#include "Adafruit_GFX.h"
#include "Wire.h"
#include "SPI.h"
#include "Adafruit_MCP23017.h"
#include "SdFat.h"
#include "WiFiClient.h"
#define INKPLATE_GAMMA 1.45
#define E_INK_WIDTH 800
#define E_INK_HEIGHT 600
#define BLACK 1
#define WHITE 0
#define GPIO0_ENABLE 8
#define INKPLATE_1BIT 0
#define INKPLATE_3BIT 1
#define PAD1 0
#define PAD2 1
#define PAD3 2
#define DATA 0x0E8C0030 //D0-D7 = GPIO4 GPIO5 GPIO18 GPIO19 GPIO23 GPIO25 GPIO26 GPIO27
#define CL 0x01 //GPIO0
#define CL_SET \
{ \
GPIO.out_w1ts = CL; \
}
#define CL_CLEAR \
{ \
GPIO.out_w1tc = CL; \
}
#define LE 0x04 //GPIO2
#define LE_SET \
{ \
GPIO.out_w1ts = LE; \
}
#define LE_CLEAR \
{ \
GPIO.out_w1tc = LE; \
}
#define CKV 0x01 //GPIO32
#define CKV_SET \
{ \
GPIO.out1_w1ts.val = CKV; \
}
#define CKV_CLEAR \
{ \
GPIO.out1_w1tc.val = CKV; \
}
#define SPH 0x02 //GPIO33
#define SPH_SET \
{ \
GPIO.out1_w1ts.val = SPH; \
}
#define SPH_CLEAR \
{ \
GPIO.out1_w1tc.val = SPH; \
}
//#define SPV 15 //GPIO15
//#define SPV_SET {digitalWrite(SPV, HIGH);}
//#define SPV_CLEAR {digitalWrite(SPV, LOW);}
//I/O Expander - A Channel
#define GMOD 1 //GPIOA1
#define GMOD_SET \
{ \
mcp.digitalWrite(GMOD, HIGH); \
}
#define GMOD_CLEAR \
{ \
mcp.digitalWrite(GMOD, LOW); \
}
#define OE 0 //GPIOA0
#define OE_SET \
{ \
mcp.digitalWrite(OE, HIGH); \
}
#define OE_CLEAR \
{ \
mcp.digitalWrite(OE, LOW); \
}
#define SPV 2 //GPIOA5
#define SPV_SET \
{ \
mcp.digitalWrite(SPV, HIGH); \
}
#define SPV_CLEAR \
{ \
mcp.digitalWrite(SPV, LOW); \
}
#define WAKEUP 3 //GPIOA3
#define WAKEUP_SET \
{ \
mcp.digitalWrite(WAKEUP, HIGH); \
}
#define WAKEUP_CLEAR \
{ \
mcp.digitalWrite(WAKEUP, LOW); \
}
#define PWRUP 4 //GPIOA4
#define PWRUP_SET \
{ \
mcp.digitalWrite(PWRUP, HIGH); \
}
#define PWRUP_CLEAR \
{ \
mcp.digitalWrite(PWRUP, LOW); \
}
#define VCOM 5 //GPIOA6
#define VCOM_SET \
{ \
mcp.digitalWrite(VCOM, HIGH); \
}
#define VCOM_CLEAR \
{ \
mcp.digitalWrite(VCOM, LOW); \
}
#define CKV_CLOCK ckvClock();
#ifndef _swap_int16_t
#define _swap_int16_t(a, b) \
{ \
int16_t t = a; \
a = b; \
b = t; \
}
#endif
extern Adafruit_MCP23017 mcp;
extern SPIClass spi2;
extern SdFat sd;
static void ckvClock();
static void usleep1();
class Inkplate : public Adafruit_GFX
{
public:
uint8_t *D_memory_new;
uint8_t *_partial;
uint8_t *D_memory4Bit;
uint8_t *_pBuffer;
const uint8_t LUT2[16] ={ B10101010, B10101001, B10100110, B10100101, B10011010, B10011001, B10010110, B10010101, B01101010, B01101001, B01100110, B01100101, B01011010, B01011001, B01010110, B01010101 };
const uint8_t LUTW[16] ={ B11111111, B11111110, B11111011, B11111010, B11101111, B11101110, B11101011, B11101010, B10111111, B10111110, B10111011, B10111010, B10101111, B10101110, B10101011, B10101010 };
const uint8_t LUTB[16] ={ B11111111, B11111101, B11110111, B11110101, B11011111, B11011101, B11010111, B11010101, B01111111, B01111101, B01110111, B01110101, B01011111, B01011101, B01010111, B01010101 };
const uint8_t pixelMaskLUT[8] ={ B00000001, B00000010, B00000100, B00001000, B00010000, B00100000, B01000000, B10000000 };
const uint8_t pixelMaskGLUT[2] ={ B00001111, B11110000 };
const uint8_t discharge[16] ={ B11111111, B11111100, B11110011, B11110000, B11001111, B11001100, B11000011, B11000000, B00111111, B00111100, B00110011, B00110000, B00001111, B00001100, B00000011, B00000000 };
//BLACK->WHITE
//THIS IS OKAYISH WAVEFORM FOR GRAYSCALE. IT CAN BE MUCH BETTER.
const uint8_t waveform3Bit[8][7] ={ { 0, 0, 0, 0, 1, 1, 1 }, { 0, 0, 1, 1, 1, 2, 1 }, { 0, 1, 1, 2, 1, 2, 1 }, { 0, 0, 1, 1, 2, 1, 2 }, { 1, 1, 1, 2, 2, 1, 2 }, { 0, 0, 1, 1, 1, 2, 2 }, { 0, 1, 1, 2, 1, 2, 2 }, { 0, 0, 0, 0, 0, 0, 2 } };
//const uint8_t waveform3Bit[8][12] = {{3,3,3,1,1,1,1,1,1,1,2,0}, {3,3,3,3,1,1,1,1,1,1,2,0}, {3,3,3,3,3,1,1,1,1,1,2,0}, {3,3,3,3,3,3,1,1,1,1,2,0}, {3,3,3,3,3,3,3,1,1,1,2,0}, {3,3,3,3,3,3,3,2,1,1,2,0}, {3,3,3,3,3,3,3,3,3,1,2,0}, {3,3,3,3,3,3,3,3,3,3,2,0}};
//const uint8_t waveform3Bit[16][12] = {{0,0,0,0,0,0,1,2,1,1,0,3},{0,0,1,1,1,2,2,2,1,1,0,3},{0,0,0,1,1,2,2,2,1,1,0,3}, {0,0,0,1,2,1,2,1,2,1,3}, {0,0,2,1,2,1,2,1,2,1,3}, {0,0,1,2,2,1,1,1,1,2,0,3}, {0,0,0,2,1,1,1,1,0,2,0,3}, {0,0,2,1,2,2,1,1,1,2,0,3}, {0,0,0,2,2,2,1,1,1,2,0,3}, {0,0,0,0,0,0,2,1,1,2,0,3}, {0,0,0,0,0,2,2,1,1,2,0,3}, {0,0,0,0,0,1,1,1,2,2,0,3}, {0,0,0,0,1,2,1,2,1,2,0,3}, {0,0,0,0,1,1,2,2,1,2,0,3},{0,0,0,0,1,1,1,2,2,2,0,3}, {0,0,0,0,0,0,0,0,0,2,0,3}};
//PVI waveform for cleaning screen, not sure if it is correct, but it cleans screen properly.
const uint32_t waveform[50] ={ 0x00000008, 0x00000008, 0x00200408, 0x80281888, 0x60a81898, 0x60a8a8a8, 0x60a8a8a8, 0x6068a868, 0x6868a868, 0x6868a868, 0x68686868, 0x6a686868, 0x5a686868, 0x5a686868, 0x5a586a68, 0x5a5a6a68, 0x5a5a6a68, 0x55566a68, 0x55565a64, 0x55555654, 0x55555556, 0x55555556, 0x55555556, 0x55555516, 0x55555596, 0x15555595, 0x95955595, 0x95959595, 0x95949495, 0x94949495, 0x94949495, 0xa4949494, 0x9494a4a4, 0x84a49494, 0x84948484, 0x84848484, 0x84848484, 0x84848484, 0xa5a48484, 0xa9a4a4a8, 0xa9a8a8a8, 0xa5a9a9a4, 0xa5a5a5a4, 0xa1a5a5a1, 0xa9a9a9a9, 0xa9a9a9a9, 0xa9a9a9a9, 0xa9a9a9a9, 0x15151515, 0x11111111 };
struct bitmapHeader
{
uint16_t signature;
uint32_t fileSize;
uint32_t startRAW;
uint32_t dibHeaderSize;
uint32_t width;
uint32_t height;
uint16_t color;
uint32_t compression;
};
Inkplate(uint8_t _mode);
void begin(void);
uint16_t getPixel(int16_t x0, int16_t y0);
void drawPixel(int16_t x0, int16_t y0, uint16_t color);
void clearDisplay();
void display();
void partialUpdate();
void drawBitmap3Bit(int16_t _x, int16_t _y, const unsigned char *_p, int16_t _w, int16_t _h);
void setRotation(uint8_t);
void einkOff(void);
void einkOn(void);
void selectDisplayMode(uint8_t _mode);
uint8_t getDisplayMode();
int drawBitmapFromSD(SdFile *p, int x, int y, bool dither = false, bool invert = false);
int drawBitmapFromSD(char *fileName, int x, int y, bool dither = false, bool invert = false);
int drawBitmapFromWeb(WiFiClient *s, int x, int y, int len, bool dither = false, bool invert = false);
int drawBitmapFromWeb(char *url, int x, int y, bool dither = false, bool invert = false);
void drawThickLine(int x1, int y1, int x2, int y2, int color, float thickness);
void drawGradientLine(int x1, int y1, int x2, int y2, int color1, int color2, float thickness = -1);
int sdCardInit();
SdFat getSdFat();
SPIClass getSPI();
uint8_t getPanelState();
uint8_t readTouchpad(uint8_t);
int8_t readTemperature();
double readBattery();
void vscan_start();
void vscan_write();
void hscan_start(uint32_t _d = 0);
void vscan_end();
void clean();
void cleanFast(uint8_t c, uint8_t rep);
void cleanFast2(uint8_t c, uint8_t n, uint16_t d);
void pinsZstate();
void pinsAsOutputs();
private:
uint8_t gammaLUT[256];
uint8_t pixelBuffer[800 * 3 + 5];
uint8_t ditherBuffer[800 * 3 + 5][2];
int8_t _temperature;
uint8_t _panelOn = 0;
uint8_t _rotation = 0;
uint8_t _displayMode = 0; //By default, 1 bit mode is used
int sdCardOk = 0;
uint8_t _blockPartial = 1;
uint8_t _beginDone = 0;
void display1b();
void display3b();
uint32_t read32(uint8_t *c);
uint16_t read16(uint8_t *c);
void ditherStart(uint8_t *pixelBuffer, uint8_t* bufferPtr, int w, bool invert, uint8_t bits);
void ditherLoadNextLine(uint8_t *pixelBuffer, uint8_t* bufferPtr, int w, bool invert, uint8_t bits);
uint8_t ditherGetPixel(int i, int j, int w, int h);
uint8_t ditherSwap(int w);
void readBmpHeaderSd(SdFile *_f, struct bitmapHeader *_h);
void readBmpHeaderWeb(WiFiClient *_s, struct bitmapHeader *_h);
int drawMonochromeBitmapSd(SdFile *f, struct bitmapHeader bmpHeader, int x, int y, bool invert);
int drawGrayscaleBitmap4Sd(SdFile *f, struct bitmapHeader bmpHeader, int x, int y, bool dither, bool invert);
int drawGrayscaleBitmap8Sd(SdFile *f, struct bitmapHeader bmpHeader, int x, int y, bool dither, bool invert);
int drawGrayscaleBitmap24Sd(SdFile *f, struct bitmapHeader bmpHeader, int x, int y, bool dither, bool invert);
int drawMonochromeBitmapWeb(WiFiClient *s, struct bitmapHeader bmpHeader, int x, int y, int len, bool invert);
int drawGrayscaleBitmap4Web(WiFiClient *s, struct bitmapHeader bmpHeader, int x, int y, int len, bool dither, bool invert);
int drawGrayscaleBitmap8Web(WiFiClient *s, struct bitmapHeader bmpHeader, int x, int y, int len, bool dither, bool invert);
int drawGrayscaleBitmap24Web(WiFiClient *s, struct bitmapHeader bmpHeader, int x, int y, int len, bool dither, bool invert);
void precalculateGamma(uint8_t *c, float gamma);
};
#endif

View File

@ -1,78 +1,96 @@
# Inkplate 6 Arduino library
![](https://www.crowdsupply.com/img/040a/inkplate-6-angle-01_png_project-main.jpg)
Arduino library for all-in-one e-paper display Inkplate 6 can be found in this repo. Inkplate 6 is a powerful, Wi-Fi enabled ESP32 based six-inch e-paper display recycled from a Kindle e-reader. Its main feature is simplicity. Just plug in a USB cable, open Arduino IDE, and change the contents of the screen with few lines of code. Learn more about Inkplate 6 on [Crowd Supply](https://www.crowdsupply.com/e-radionica/inkplate-6).
Arduino library for all-in-one e-paper display Inkplate 6 can be found in this repo. Inkplate 6 is a powerful, Wi-Fi enabled ESP32 based six-inch e-paper display recycled from a Kindle e-reader. Its main feature is simplicity. Just plug in a USB cable, open Arduino IDE, and change the contents of the screen with few lines of code. Learn more about Inkplate 6 on [official website](https://inkplate.io/). Inkplate was crowdfunded on [Crowd Supply](https://www.crowdsupply.com/e-radionica/inkplate-6).
### Setting up Inkplate 6 in Arduino IDE
In order to get a head start with Inkplate 6, follow these steps:
1. [Install Inkplate 6 board definition](https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/) - add Inkplate 6 as a board into your Arduino IDE. Follow the instructions on the [link](https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/).
1. [Install Inkplate 6 board definition](https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/) - add Inkplate 6 as a board into your Arduino IDE. Follow the instructions on the [link](https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/).
2. Install CH340 drivers (if you don't have them yet) - instructions [here](https://e-radionica.com/en/blog/ch340-driver-installation-croduino-basic3-nova2/)
3. Install Inkplate 6 Arduino library - install the library from this repo into your Arduino IDE. If you don't know how, check our [tutorial](https://e-radionica.com/en/blog/arduino-library/#Kako%20instaliraty%20library?).
4. Install [custom SdFat library](https://github.com/e-radionicacom/Inkplate-6-SDFat-Arduino-Library) into your Arduino IDE.
5. You are ready to get started! Select Tools -> Board -> Inkplate 6, as well as correct COM port and upload!
4. You are ready to get started! Select Tools -> Board -> Inkplate 6, as well as correct COM port and upload!
### Code examples
There are many examples in the library that you demonstrate how to use any of the Inkplate functionality.
There are many examples in the library that you demonstrate how to use any of the Inkplate functionality.
More are added daily, such as projects or community contributions, so here are just the basic ones.
1. **Basic Inkplate Functionality**
1.1. Basic Monochrome - use the screen in monochrome mode (graphics & text)
1.2. Basic Grayscale - use the screen in grayscale mode (graphics & text)
1.3. Basic Partial Update - do a partial update of the screen on Inkplate 6
1.4. Basic Custom Fonts - add custom fonts and use them to write text on the screen
1.1. Basic BW - use the screen in BW mode (graphics & text)
1.2. Basic Gray - use the screen in gray mode (graphics & text)
1.3. Basic Partial Update - do a partial update of the screen on Inkplate 6
1.4. Basic Custom Fonts - add custom fonts and use them to write text on the screen
2. **Advanced Inkplate Functionality**
2.1. WiFi HTTP Request - make HTTP request while connected too WiFi
2.2. Low Power - put Inkplate in sleep in order to save battery
2.3. Battery Voltage And Temperature - measure battery voltage and temperature of the board
2.4. Touchpads - get readings from onboard touch pads
2.5. SD BMP Pictures - show .bmp images from the SD card on the screen
2.6. Inkplate SD TXT File - read .txt file from the SD card and show it on the screen
2.7. easyC - use easyC ecosystem (I2C) and read a sensor value
2.1. WiFi HTTP Request - make HTTP request while connected too WiFi
2.8. MCP23017 Expander - use onboard MCP23017 expander for your own external devices
2.2. Low Power - put Inkplate in sleep in order to save battery
2.9. Web Server - make Inkplate a web server
2.3. Battery Voltage And Temperature - measure battery voltage and temperature of the board
2.4. Touchpads - get readings from onboard touch pads
2.5. SD Pictures - show .bmp, .jpg and .png images from the SD card on the screen
2.6. Web Pictures - show .bmp, .jpg and .png images from the web
2.7. Inkplate SD TXT File - read .txt file from the SD card and show it on the screen
2.8. easyC - use easyC ecosystem (I2C) and read a sensor value
2.9. MCP23017 Expander - use onboard MCP23017 expander for your own external devices
2.10. Web Server - make Inkplate a web server
3. **Others**
3.1. Slave Mode - mode that enables control of the screen from any external device using UART
3.2. Screen Cleaning - clean the screen in case of image burn-in
3.1. Peripheral Mode - mode that enables control of the screen from any external device using UART
### Using Inkplate 6 with another microcontroller
As promised in an [early update](https://www.crowdsupply.com/e-radionica/inkplate-6/updates/successfully-funded-also-third-party-master-controllers-and-partial-updates), Inkplate 6's screen contents can be updated using 3rd controller (such as Raspberry Pi or another microcontroller). The "Slave Mode" (unpopular name right now, we are aware and will change) enables this. All brand new Inkplates come pre-programmed with slave mode and can be used right away.
3.2. Screen Cleaning - clean the screen in case of image burn-in
It is based on UART (serial) communication - connect the Inkplate to "master" board either via USB cable or directly via ESP32 RX and TX pins. Using standard UART at 115200 baud, you can send commands to change screen contents. For example, send *#H(000,000,"/img.bmp")** to show image img.bmp from SD card on the screen. Find very basic documentation for using it [here](https://github.com/e-radionicacom/Inkplate-6-Arduino-library/blob/master/examples/4.%20Others/1-Inkplate_Slave_Mode/Inkplate_slave_mode_documentation.txt).
### Using Inkplate 6 with another microcontroller - Peripheral mode
As promised in an [early update](https://www.crowdsupply.com/e-radionica/inkplate-6/updates/successfully-funded-also-third-party-master-controllers-and-partial-updates), Inkplate 6's screen contents can be updated using 3rd controller (such as Raspberry Pi or another microcontroller). The Peripheral mode enables this. All brand new Inkplates come pre-programmed with slave mode and can be used right away.
It is based on UART (serial) communication - connect the Inkplate to "Controller" ("Master", if using old terminology) board either via USB cable or directly via ESP32 RX and TX pins. Using standard UART at 115200 baud, you can send commands to change screen contents. For example, send \*#H(000,000,"/img.bmp")\*\* to show image img.bmp from SD card on the screen. Find very documentation for using it [here](https://inkplate.readthedocs.io/en/latest/slave-mode.html).
### Battery power
Inkplate 6 has two options for powering it. First one is obvious - USB port at side of the board. Just plug any micro USB cable and you are good to go. Second option is battery. Supported batteries are standard Li-Ion/Li-Poly batteries with 3.7V nominal voltage. Connector for the battery is standard 2.00mm pitch JST connector. The onboard charger will charge the battery with 500mA when USB is plugged at the same time. You can use battery of any size or capacity if you don't have a enclosure. If you are using our enclosure, battery size shouldn't exceed 90mm x 40mm (3.5 x 1.57 inch) and 5mm (0.19 inch) in height.
Inkplate 6 has two options for powering it. First one is obvious - USB port at side of the board. Just plug any micro USB cable and you are good to go. Second option is battery. Supported batteries are standard Li-Ion/Li-Poly batteries with 3.7V nominal voltage. Connector for the battery is standard 2.00mm pitch JST connector. The onboard charger will charge the battery with 500mA when USB is plugged at the same time. You can use battery of any size or capacity if you don't have a enclosure. If you are using our enclosure, battery size shouldn't exceed 90mm x 40mm (3.5 x 1.57 inch) and 5mm (0.19 inch) in height. [This battery](https://e-radionica.com/en/li-ion-baterija-1200mah.html) is good fit for the Inkplate.
### Linux?
Running Linux? You'll need to run few other lines from your Terminal:
```
apt install python3-pip
pip3 install pyserial
apt install python-is-python3
```
### Micropython
If you are looking for micropython support, it is still work in progress - we are new with it! :) When it's ready, we will let you know with new project update.
If you are looking for micropython support, please find all details [here](https://github.com/e-radionicacom/Inkplate-6-micropython).
### License
This repo uses the source code from Adafruit libraries: [MCP23017](https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library), [Adafruit GFX](https://github.com/adafruit/Adafruit-GFX-Library).
This repo uses the source code from another repositories. All their license files are located in "licences" folder.
### Where to buy & other
Inkplate 6 is available for purchase via:
- [e-radionica.com](https://e-radionica.com/en/inkplate.html)
- [Crowd Supply](https://www.crowdsupply.com/e-radionica/inkplate-6)
- [Mouser](https://hr.mouser.com/Search/Refine?Keyword=inkplate)
- [Sparkfun](https://www.sparkfun.com/search/results?term=inkplate)
- [Pimoroni](https://shop.pimoroni.com/products/inkplate-6)
Inkplate 6 is open-source. If you are looking for hardware design of the board, check the [Hardware repo](https://github.com/e-radionicacom/Inkplate-6-hardware). You will find 3D printable [enclosure](https://github.com/e-radionicacom/Inkplate-6-hardware/tree/master/3D%20printable%20case) there, as well as [detailed dimensions](https://github.com/e-radionicacom/Inkplate-6-hardware/tree/master/Technical%20drawings). In this repo you will find code for driving the ED060SC7 e-paper display used by Inkplate.

View File

@ -1,386 +0,0 @@
/*
1_Basic_monochorme example for e-radionica.com Inkplate 6
For this example you will need only USB cable and Inkplate 6.
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example will show you how you can draw some simple graphics using
Adafruit GFX functions. Yes, Inkplate library is 100% compatible with GFX lib!
Learn more about Adafruit GFX: https://learn.adafruit.com/adafruit-gfx-graphics-library )
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
Inkplate display(INKPLATE_1BIT); //Create object on Inkplate library and set library to work in monochorme mode
//Other option is greyscale mode, which is demonstrated in next example "2-Inkplate_basic_greyscale"
#define DELAY_MS 5000 //Delay in milliseconds between screen refresh. Refreshing e-paper screens more often than 5s is not recommended
//Want to refresh faster? Use partial update! Find example in "3-Inkplate-basic_partial_update"
//Array that holds data for bitmap image of 576x100 pixels. You can convert your own image using LCD image Converter.
const uint8_t logo[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0f, 0xff, 0xff, 0x00, 0x00, 0x3f, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x1f, 0xff, 0xf8, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x7f, 0xff, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x03, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x07, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x0f, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x1f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x3f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x07, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0f, 0xfc, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0f, 0xf8, 0x00, 0x07, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc3, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0f, 0xf8, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc3, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1f, 0xf0, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x07, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc3, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1f, 0xf0, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x03, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc3, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3f, 0xe0, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x03, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc3, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3f, 0xe0, 0x03, 0xff, 0xfc, 0x00, 0x7d, 0xff, 0xff, 0x80, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc3, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3f, 0xc0, 0x07, 0xfe, 0x30, 0x00, 0x30, 0xff, 0xff, 0x80, 0x01, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3f, 0xc0, 0x0f, 0xfc, 0x30, 0x00, 0x30, 0xff, 0xff, 0x80, 0x01, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x7f, 0xc0, 0x1f, 0xf0, 0x38, 0x70, 0x20, 0xfe, 0x1f, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x7f, 0xc0, 0x1f, 0xe0, 0x3f, 0xf8, 0x78, 0xfc, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x80, 0x01, 0xff, 0xfc, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xc1, 0xc0, 0x00, 0xff, 0xfe, 0x00, 0x0f, 0xff, 0xfe, 0x00, 0x00, 0xe0, 0x00, 0x7f, 0xff, 0x00, 0x00, 0x07, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0x80, 0x3f, 0xc0, 0x3f, 0xf8, 0xf8, 0xfc, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xc0, 0x1f, 0xff, 0xff, 0xc0, 0x01, 0xff, 0xff, 0xff, 0xc3, 0xe0, 0x0f, 0xff, 0xff, 0xe0, 0x1f, 0xff, 0xff, 0xf0, 0x00, 0xf0, 0x07, 0xff, 0xff, 0xf0, 0x00, 0x7f, 0xff, 0xff, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xfe, 0x00, 0x07, 0xff, 0xff, 0xe0, 0x0f, 0xff, 0xff, 0x07, 0xff, 0xfc, 0x00,
0xff, 0x80, 0x3f, 0x80, 0x3f, 0xf8, 0xf8, 0xfc, 0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xc0, 0x3f, 0xff, 0xff, 0xe0, 0x03, 0xff, 0xff, 0xff, 0xc3, 0xf0, 0x1f, 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xfc, 0x01, 0xf0, 0x0f, 0xff, 0xff, 0xf8, 0x00, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0xf0, 0x0f, 0xff, 0xff, 0x8f, 0xff, 0xff, 0x00,
0xff, 0x00, 0x7f, 0x00, 0x00, 0xf0, 0x78, 0xfc, 0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xc0, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0xff, 0xff, 0xff, 0xc3, 0xf0, 0x3f, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xfe, 0x01, 0xf0, 0x3f, 0xff, 0xff, 0xfc, 0x03, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x03, 0xff, 0xff, 0xff, 0xc0, 0x1f, 0xff, 0xff, 0xfc, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x30, 0xfc, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xc0, 0xff, 0xff, 0xff, 0xf8, 0x0f, 0xff, 0xff, 0xff, 0xc3, 0xf0, 0x7f, 0xff, 0xff, 0xfc, 0x1f, 0xff, 0xff, 0xff, 0x01, 0xf0, 0x3f, 0xff, 0xff, 0xfe, 0x03, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x03, 0xff, 0xff, 0xff, 0xc0, 0x3f, 0xff, 0xff, 0xfc, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0,
0xff, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00, 0x7f, 0x80, 0x01, 0xff, 0x00, 0x00, 0x00, 0x7f, 0xe0, 0x00, 0x01, 0xfe, 0x00, 0x07, 0xf8, 0x1f, 0xe0, 0x00, 0x0f, 0xc3, 0xf0, 0xff, 0x00, 0x03, 0xfc, 0x1f, 0x80, 0x01, 0xff, 0x81, 0xf0, 0x7f, 0x80, 0x01, 0xff, 0x07, 0xf8, 0x00, 0x1f, 0xf0, 0x00, 0x03, 0xf0, 0x00, 0x0f, 0xe0, 0x3f, 0x00, 0x00, 0xfe, 0x0f, 0xc0, 0x07, 0xff, 0x00, 0x1f, 0xf0,
0xff, 0x80, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x01, 0xfc, 0x00, 0x01, 0xfc, 0x1f, 0xc0, 0x00, 0x07, 0xc3, 0xf0, 0xfe, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x7f, 0xc1, 0xf0, 0x7f, 0x00, 0x00, 0x7f, 0x07, 0xf0, 0x00, 0x07, 0xf0, 0x00, 0x07, 0xe0, 0x00, 0x07, 0xf0, 0x7e, 0x00, 0x00, 0x7f, 0x0f, 0x80, 0x03, 0xff, 0x00, 0x07, 0xf0,
0xff, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf0, 0xfc, 0x00, 0x00, 0x7e, 0x1f, 0x00, 0x00, 0x1f, 0xc1, 0xf0, 0xfe, 0x00, 0x00, 0x3f, 0x0f, 0xe0, 0x00, 0x03, 0xf0, 0x00, 0x07, 0xc0, 0x00, 0x03, 0xf0, 0x7c, 0x00, 0x00, 0x3f, 0x0f, 0x80, 0x00, 0xff, 0x00, 0x03, 0xf0,
0xff, 0xff, 0xfd, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf8, 0x00, 0x00, 0x3e, 0x1f, 0x00, 0x00, 0x0f, 0xc1, 0xf0, 0xfc, 0x00, 0x00, 0x1f, 0x0f, 0xc0, 0x00, 0x01, 0xf0, 0x00, 0x0f, 0xc0, 0x00, 0x01, 0xf0, 0xfc, 0x00, 0x00, 0x1f, 0x0f, 0x80, 0x00, 0x7f, 0x00, 0x01, 0xf8,
0xff, 0xff, 0xff, 0xff, 0x01, 0xc0, 0x00, 0xff, 0xfc, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x7c, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x07, 0xe1, 0xf0, 0xfc, 0x00, 0x00, 0x1f, 0x0f, 0xc0, 0x00, 0x01, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x01, 0xf0, 0xf8, 0x00, 0x00, 0x1f, 0x0f, 0x80, 0x00, 0x3f, 0x00, 0x00, 0xfc,
0xff, 0xff, 0xff, 0xff, 0x83, 0xe0, 0x00, 0xff, 0xfc, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xe1, 0xf0, 0xfc, 0x00, 0x00, 0x0f, 0x0f, 0xc0, 0x00, 0x03, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xf0, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00, 0x3f, 0x00, 0x00, 0xfc,
0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0xff, 0xfc, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xe1, 0xf0, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00, 0x3f, 0x00, 0x00, 0x7e,
0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0xff, 0xfc, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00, 0x3f, 0x00, 0x00, 0x7e,
0x3f, 0xfd, 0xfd, 0xfe, 0x03, 0xc0, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 0xf8, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xfc, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f,
0x3f, 0xfc, 0xfc, 0xfc, 0x00, 0x80, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 0xf8, 0x00, 0x7f, 0xfe, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xfc, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f,
0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00, 0xf8, 0x1f, 0xff, 0xfc, 0x07, 0xff, 0xc3, 0xf0, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xfc, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f,
0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xfc, 0x0f, 0xff, 0xc3, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfc, 0x7c, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xf1, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f,
0x00, 0x00, 0xff, 0x00, 0x70, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xc0, 0x0f, 0xff, 0xc3, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x7c, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x00, 0x03, 0xff, 0xfc, 0x00, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f,
0x00, 0x00, 0x7f, 0x00, 0xf8, 0x02, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x00, 0xff, 0xff, 0xfe, 0x00, 0x0f, 0xff, 0xc3, 0xf0, 0x00, 0x00, 0x01, 0xff, 0xf8, 0x00, 0x7c, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x00, 0x07, 0xff, 0xe0, 0x00, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f,
0x00, 0x00, 0x3f, 0x80, 0xf8, 0x0f, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0xff, 0xff, 0xc0, 0x00, 0x07, 0xff, 0xc3, 0xf0, 0x00, 0x00, 0x03, 0xff, 0x00, 0x00, 0x7c, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x00, 0x07, 0xfc, 0x00, 0x00, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f,
0x00, 0x00, 0x3f, 0xc0, 0xf8, 0x0f, 0x80, 0xfc, 0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x7c, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f,
0x00, 0x00, 0x1f, 0xe0, 0xf0, 0x0f, 0x80, 0xfc, 0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x0f, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x7c, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x0f, 0x0f, 0xc0, 0x00, 0x00, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe0, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f,
0x00, 0x00, 0x1f, 0xf0, 0x60, 0x0f, 0x80, 0xfc, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 0x7c, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x0f, 0x0f, 0xc0, 0x00, 0x01, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xf0, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f,
0x00, 0x00, 0x0f, 0xfc, 0x20, 0x06, 0x00, 0xff, 0xff, 0x80, 0x00, 0xff, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x7c, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x1f, 0x0f, 0xc0, 0x00, 0x01, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x01, 0xf0, 0xf8, 0x00, 0x00, 0x1f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f,
0x00, 0x00, 0x07, 0xfe, 0x70, 0x0e, 0x00, 0xff, 0xff, 0x80, 0x00, 0xff, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x0f, 0xc3, 0xf0, 0xf8, 0x00, 0x00, 0x3e, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x1f, 0x0f, 0xc0, 0x00, 0x01, 0xf0, 0x00, 0x0f, 0xc0, 0x00, 0x01, 0xf0, 0xfc, 0x00, 0x00, 0x1f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f,
0x07, 0x80, 0x03, 0xff, 0xf8, 0x3e, 0x01, 0xff, 0xff, 0x80, 0x01, 0xff, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0xfc, 0x3f, 0x80, 0x00, 0x0f, 0xc3, 0xf0, 0xfc, 0x00, 0x00, 0x7e, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0x7e, 0x00, 0x00, 0x3f, 0x0f, 0xe0, 0x00, 0x03, 0xf0, 0x00, 0x07, 0xc0, 0x00, 0x03, 0xf0, 0x7c, 0x00, 0x00, 0x3f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f,
0x0f, 0xc0, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x03, 0xff, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x03, 0xfc, 0x00, 0x01, 0xfc, 0x1f, 0xc0, 0x00, 0x1f, 0xc3, 0xf0, 0xfe, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0x7f, 0x00, 0x00, 0x7f, 0x07, 0xf0, 0x00, 0x07, 0xf0, 0x0e, 0x07, 0xe0, 0x00, 0x07, 0xe0, 0x7e, 0x00, 0x00, 0x7e, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f,
0x0f, 0xe0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0x00, 0x03, 0xfe, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0x83, 0xf0, 0xff, 0xff, 0xff, 0xfc, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0x3f, 0xff, 0xff, 0xfe, 0x07, 0xff, 0xff, 0xff, 0xe0, 0x1f, 0x03, 0xff, 0xff, 0xff, 0xe0, 0x3f, 0xff, 0xff, 0xfe, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f,
0x1f, 0xf0, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x03, 0xfe, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0xff, 0xff, 0xff, 0x83, 0xf0, 0x7f, 0xff, 0xff, 0xfc, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0x3f, 0xff, 0xff, 0xfe, 0x03, 0xff, 0xff, 0xff, 0xe0, 0x3f, 0x03, 0xff, 0xff, 0xff, 0xc0, 0x3f, 0xff, 0xff, 0xfc, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f,
0x1f, 0xf0, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x03, 0xfc, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf0, 0x07, 0xff, 0xff, 0xff, 0x03, 0xf0, 0x3f, 0xff, 0xff, 0xf8, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0x1f, 0xff, 0xff, 0xfc, 0x01, 0xff, 0xff, 0xff, 0xc0, 0x3f, 0x01, 0xff, 0xff, 0xff, 0x80, 0x1f, 0xff, 0xff, 0xf8, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f,
0x0f, 0xf0, 0x00, 0x07, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x07, 0xfc, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xe0, 0x03, 0xff, 0xff, 0xfe, 0x03, 0xf0, 0x1f, 0xff, 0xff, 0xf0, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0x0f, 0xff, 0xff, 0xf8, 0x00, 0xff, 0xff, 0xff, 0x80, 0x3f, 0x00, 0xff, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0xf0, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f,
0x0f, 0xf8, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x03, 0xe0, 0x07, 0xff, 0xff, 0xc0, 0x0f, 0x00, 0x00, 0x03, 0xe0, 0xf0, 0x03, 0xff, 0xff, 0xe0, 0x00, 0x3f, 0xff, 0xfe, 0x00, 0x0e, 0x00, 0x1f, 0xff, 0xf8, 0x00, 0x01, 0xff, 0xff, 0x80, 0x07, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x3c,
0x0f, 0xfc, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0xff, 0xfc, 0x00, 0x00, 0x1f, 0xff, 0xc0, 0x00, 0xc0, 0x00, 0xff, 0xfe, 0x00, 0x06, 0x00, 0x00, 0x00, 0xc0, 0x60, 0x00, 0x7f, 0xff, 0x00, 0x00, 0x07, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x07, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x07, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x3f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x07, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x03, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x3f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00, 0x03, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0f, 0xff, 0xff, 0x00, 0x00, 0x3f, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x07, 0xff, 0xff, 0xe0, 0x03, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
void setup()
{
display.begin(); //Init library (you should call this function ONLY ONCE)
display.clearDisplay(); //Clear any data that may have been in (software) frame buffer.
//(NOTE! This does not clean image on screen, it only clears it in the frame buffer inside ESP32).
display.clean(); //Clear everything that has previously been on a screen
display.setCursor(150, 320);
display.setTextSize(4);
display.print("Welcome to Inkplate 6!");
display.display(); //Write hello message
delay(5000); //Wait a little bit
}
void loop()
{
//Example will demostrate funcionality one by one. You always first set everything in the frame buffer and afterwards you show
//it on the screen using display.display().
//Let's start by drawing a pixel at x = 100 and y = 50 location
display.clearDisplay(); //Clear everytning that is inside frame buffer in ESP32
displayCurrentAction("Drawing a pixel"); //Function which writes small text at bottom left indicating what's currently done
//NOTE: you do not need displayCurrentAction function to use Inkplate!
display.drawPixel(100, 50, BLACK); //Draw one black pixel at X = 100, Y = 50 position in BLACK color (must be black since Inkplate is in monochrome mode)
display.display(); //Send image to display. You need to call this one each time you want to transfer frame buffer to the screen.
delay(DELAY_MS); //Wait a little bit
//Now, let's draw some random pixels!
display.clearDisplay(); //Clear everything that is inside frame buffer in ESP32
for (int i = 0; i < 600; i++)
{ //Write 600 black pixels at random locations
display.drawPixel(random(0, 799), random(0, 599), BLACK);
}
displayCurrentAction("Drawing 600 random pixels");
display.display(); //Write everything from frame buffer to screen
delay(DELAY_MS); //Wait
//Draw two diagonal lines accros screen
display.clearDisplay();
display.drawLine(0, 0, 799, 599, BLACK); //All of those drawing fuctions originate from Adafruit GFX library, so maybe you are already familiar
display.drawLine(799, 0, 0, 599, BLACK); //with those. Arguments are: start X, start Y, ending X, ending Y, color.
displayCurrentAction("Drawing two diagonal lines");
display.display();
delay(DELAY_MS);
//And again, let's draw some random lines on screen!
display.clearDisplay();
for (int i = 0; i < 50; i++)
{
display.drawLine(random(0, 799), random(0, 599), random(0, 799), random(0, 599), BLACK);
}
displayCurrentAction("Drawing 50 random lines");
display.display();
delay(DELAY_MS);
//Let's draw some random thick lines on screen!
display.clearDisplay();
for (int i = 0; i < 50; i++)
{
display.drawThickLine(random(0, 799), random(0, 599), random(0, 799), random(0, 599), BLACK, (float)random(1, 20));
}
displayCurrentAction("Drawing 50 random lines");
display.display();
delay(DELAY_MS);
//Now draw one horizontal...
display.clearDisplay();
display.drawFastHLine(100, 100, 600, BLACK); //Arguments are: starting X, starting Y, length, color
displayCurrentAction("Drawing one horizontal line");
display.display();
delay(DELAY_MS);
//... and one vertical line
display.clearDisplay();
display.drawFastVLine(100, 100, 400, BLACK); //Arguments are: starting X, starting Y, length, color
displayCurrentAction("Drawing one vertical line");
display.display();
delay(DELAY_MS);
//Now, let' make a grid using only horizontal and vertical lines
display.clearDisplay();
for (int i = 0; i < 800; i += 8)
{
display.drawFastVLine(i, 0, 600, BLACK);
}
for (int i = 0; i < 600; i += 4)
{
display.drawFastHLine(0, i, 800, BLACK);
}
displayCurrentAction("Drawing a grid using horizontal and vertical lines");
display.display();
delay(DELAY_MS);
//Draw rectangle at X = 200, Y = 200 and size of 400x300 pixels
display.clearDisplay();
display.drawRect(200, 200, 400, 300, BLACK); //Arguments are: start X, start Y, size X, size Y, color
displayCurrentAction("Drawing rectangle");
display.display();
delay(DELAY_MS);
//Draw rectangles on random location, size 100x150 pixels
display.clearDisplay();
for (int i = 0; i < 50; i++)
{
display.drawRect(random(0, 799), random(0, 599), 100, 150, BLACK);
}
displayCurrentAction("Drawing many rectangles");
display.display();
delay(DELAY_MS);
//Draw filled black rectangle at X = 200, Y = 200, size of 400x300 pixels
display.clearDisplay();
display.fillRect(200, 200, 400, 300, BLACK); //Arguments are: start X, start Y, size X, size Y, color
displayCurrentAction("Drawing black rectangle");
display.display();
delay(DELAY_MS);
//Draw filled black rectangles on random location, size of 30x30 pixels
display.clearDisplay();
for (int i = 0; i < 50; i++)
{
display.fillRect(random(0, 799), random(0, 599), 30, 30, BLACK);
}
displayCurrentAction("Drawing many filled rectangles randomly");
display.display();
delay(DELAY_MS);
//Draw circle at center of a screen with radius of 75 pixels
display.clearDisplay();
display.drawCircle(400, 300, 75, BLACK); //Arguments are: start X, start Y, radius, color
displayCurrentAction("Drawing a circle");
display.display();
delay(DELAY_MS);
//Draw some circles at random location with radius of 25 pixels
display.clearDisplay();
for (int i = 0; i < 40; i++)
{
display.drawCircle(random(0, 799), random(0, 599), 25, BLACK);
}
displayCurrentAction("Drawing many circles randomly");
display.display();
delay(DELAY_MS);
//Draw black filled circle at center of a screen with radius of 75 pixels
display.clearDisplay();
display.fillCircle(400, 300, 75, BLACK); //Arguments are: start X, start Y, radius, color
displayCurrentAction("Drawing black-filled circle");
display.display();
delay(DELAY_MS);
//Draw some black filled circles at random location with radius of 15 pixels
display.clearDisplay();
for (int i = 0; i < 40; i++)
{
display.fillCircle(random(0, 799), random(0, 599), 15, BLACK);
}
displayCurrentAction("Drawing many filled circles randomly");
display.display(); //To show stuff on screen, you always need to call display.display();
delay(DELAY_MS);
//Draw rounded rectangle at X = 200, Y = 200 and size of 400x300 pixels and radius of 10 pixels
display.clearDisplay();
display.drawRoundRect(200, 200, 400, 300, 10, BLACK); //Arguments are: start X, start Y, size X, size Y, radius, color
displayCurrentAction("Drawing rectangle with rounded edges");
display.display();
delay(DELAY_MS);
//Draw rounded rectangles on random location, size 100x150 pixels, radius of 5 pixels
display.clearDisplay();
for (int i = 0; i < 50; i++)
{
display.drawRoundRect(random(0, 799), random(0, 599), 100, 150, 5, BLACK);
}
displayCurrentAction("Drawing many rounded edges rectangles");
display.display();
delay(DELAY_MS);
//Draw filled black rect at X = 200, Y = 200, size of 400x300 pixels and radius of 10 pixels
display.clearDisplay();
display.fillRoundRect(200, 200, 400, 300, 10, BLACK); //Arguments are: start X, start Y, size X, size Y, radius, color
displayCurrentAction("This is filled rectangle with rounded edges");
display.display();
delay(DELAY_MS);
//Draw filled black rects on random location, size of 30x30 pixels, radius of 3 pixels
display.clearDisplay();
for (int i = 0; i < 50; i++)
{
display.fillRoundRect(random(0, 799), random(0, 599), 30, 30, 3, BLACK);
}
displayCurrentAction("Random rounded edge filled rectangles");
display.display();
delay(DELAY_MS);
//Draw simple triangle
display.clearDisplay();
display.drawTriangle(250, 400, 550, 400, 400, 100, BLACK); //Arguments are: X1, Y1, X2, Y2, X3, Y3, color
display.display();
delay(DELAY_MS);
//Draw filled triangle inside simple triangle (so no display.clearDisplay() this time)
display.fillTriangle(300, 350, 500, 350, 400, 150, BLACK); //Arguments are: X1, Y1, X2, Y2, X3, Y3, color
displayCurrentAction("Drawing filled triangle inside exsisting one");
display.display();
delay(DELAY_MS);
//Display some bitmap on screen. We are going to display e-radionica logo on display at location X = 200, Y = 200
//Image is 576x100 pixels and we want to every pixel of this bitmap to be black.
display.clearDisplay();
display.drawBitmap(100, 250, logo, 576, 100, BLACK); //Arguments are: start X, start Y, array variable name, size X, size Y, color
displayCurrentAction("Drawing e-radionica.com logo");
display.display();
delay(DELAY_MS);
//Write some text on screen with different sizes
display.clearDisplay();
for (int i = 0; i < 6; i++)
{
display.setTextSize(i + 1); //textSize parameter starts at 0 and goes up to 10 (larger won't fit Inkplate 6 screen)
display.setCursor(200, (i * i * 8)); //setCursor works as same as on LCD displays - sets "the cursor" at the place you want to write someting next
display.print("INKPLATE 6!"); //The actual text you want to show on e-paper as String
}
displayCurrentAction("Text in different sizes and shadings");
display.display(); //To show stuff on screen, you always need to call display.display();
delay(DELAY_MS);
//Write same text on different location, but now invert colors (text is white, text background is black), without cleaning the previous text
display.setTextColor(WHITE, BLACK); //First argument is text color, while second argument is background color. In monochrome, there are
for (int i = 0; i < 6; i++)
{ //only two options: BLACK & WHITE
display.setTextSize(i + 1);
display.setCursor(200, 300 + (i * i * 8));
display.print("INKPLATE 6!");
}
display.display();
delay(DELAY_MS);
//Write text and rotate it by 90 deg. forever
int r = 0;
display.setTextSize(8);
display.setTextColor(WHITE, BLACK);
while (true)
{
display.setCursor(100, 100);
display.clearDisplay();
display.setRotation(r); //Set rotation will sent rotation for the entire display, so you can use it sideways or upside-down
display.print("INKPLATE6");
display.display();
r++;
delay(DELAY_MS);
}
}
//Small function that will write on the screen what function is currently in demonstration.
void displayCurrentAction(String text)
{
display.setTextSize(2);
display.setCursor(2, 580);
display.print(text);
}

View File

@ -1,303 +0,0 @@
/*
2_Basic_grayscale example for e-radionica.com Inkplate 6
For this example you will need only USB cable and Inkplate 6
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example will show you how you can draw some simple graphics using
Adafruit GFX functions. Yes, Inkplate library is 100% compatible with GFX lib!
Learn more about Adafruit GFX: https://learn.adafruit.com/adafruit-gfx-graphics-library
Inkplate will be used in grayscale mode which is 3 bit, so you can have up to 8 different colors (black, 6 gray colors and white)
Color is represented by number, where number 0 means black and number 7 means white, while everything in between are shades of gray.
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
#include "image.h" //Include image file that holds grayscale image data. You can see it in next tab inside Arduino IDE.
Inkplate display(INKPLATE_3BIT); //Create object on Inkplate library and set library to work in grayscale mode (3-bit)
//Other option is monochrome mode, which is demonstrated in next example "2-Inkplate_basic_monochrome"
#define DELAY_MS 5000 //Delay in milliseconds between screen refresh. Refreshing e-paper screens more often than 5s is not recommended \
//Want to refresh faster? Use partial update! Find example in "3-Inkplate-basic_partial_update"
void setup()
{
display.begin(); //Init library (you should call this function ONLY ONCE)
display.clearDisplay(); //Clear any data that may have been in (software) frame buffer.
//(NOTE! This does not clean image on screen, it only clears it in the frame buffer inside ESP32).
display.clean(); //Clear everything that has previously been on a screen
display.setTextColor(0, 7);
display.setCursor(150, 320);
display.setTextSize(4);
display.print("Welcome to Inkplate 6!");
display.display(); //Write hello message
delay(5000); //Wait a little bit
}
void loop()
{
//Example will demostrate funcionality one by one. You always first set everything in the frame buffer and afterwards you show
//it on the screen using display.display().
//Let'sstart by drawing pixel at x = 100 and y = 50 location
display.clearDisplay(); //Clear everytning that is inside frame buffer in ESP32
display.drawPixel(100, 50, 0); //Draw one black pixel at X = 100, Y = 50 position in 0 (BLACK) color
displayCurrentAction("Drawing a pixel"); //Function which writes small text at bottom left indicating what's currently done
//NOTE: you do not need displayCurrentAction function to use Inkplate!
display.display(); //Send image to display. You need to call this one each time you want to transfer frame buffer to the screen.
delay(DELAY_MS); //Wait a little bit
//Now, let's draw some random pixels!
display.clearDisplay(); //Clear everything that is inside frame buffer in ESP32
for (int i = 0; i < 1000; i++)
{ //Write 1000 random colored pixels at random locations
display.drawPixel(random(0, 799), random(0, 599), random(0, 7)); //We are setting color of the pixels using numbers from 0 to 7,
} //where 0 mens black, 7 white and gray is in between
displayCurrentAction("Drawing 600 random pixels in random colors");
display.display(); //Write everything from frame buffer to screen
delay(DELAY_MS); //Wait
//Draw two diagonal lines accros screen
display.clearDisplay();
display.drawLine(0, 0, 799, 599, 0); //All of those drawing fuctions originate from Adafruit GFX library, so maybe you are already familiar
display.drawLine(799, 0, 0, 599, 0); //with those. Arguments are: start X, start Y, ending X, ending Y, color.
displayCurrentAction("Drawing two diagonal lines");
display.display();
delay(DELAY_MS);
//And again, let's draw some random lines on screen!
display.clearDisplay();
for (int i = 0; i < 100; i++)
{
display.drawLine(random(0, 799), random(0, 599), random(0, 799), random(0, 599), random(0, 7));
}
displayCurrentAction("Drawing 50 random lines in random colors");
display.display();
delay(DELAY_MS);
//Let's draw some random thick lines on screen!
display.clearDisplay();
for (int i = 0; i < 100; i++)
{
display.drawThickLine(random(0, 799), random(0, 599), random(0, 799), random(0, 599), random(0, 7), (float)random(1, 20));
}
displayCurrentAction("Drawing 50 random lines in random colors and thickness");
display.display();
delay(DELAY_MS);
//Let's draw some random gradient thick lines on screen!
display.clearDisplay();
for (int i = 0; i < 100; i++)
{
int startColor = random(0, 7);
int endColor = random(startColor, 7);
display.drawGradientLine(random(0, 799), random(0, 599), random(0, 799), random(0, 599), startColor, endColor, (float)random(1, 20));
}
displayCurrentAction("Drawing 50 random gradient lines in random colors and thickness");
display.display();
delay(DELAY_MS);
//Now draw one horizontal...
display.clearDisplay();
display.drawFastHLine(100, 100, 600, 0); //Arguments are: starting X, starting Y, length, color
displayCurrentAction("Drawing one horizontal line");
display.display();
delay(DELAY_MS);
//... and one vertical line
display.clearDisplay();
display.drawFastVLine(100, 100, 400, 0); //Arguments are: starting X, starting Y, length, color
displayCurrentAction("Drawing one vertical line");
display.display();
delay(DELAY_MS);
//Now, let' make a grid using only horizontal and vertical lines in random colors!
display.clearDisplay();
for (int i = 0; i < 800; i += 8)
{
display.drawFastVLine(i, 0, 600, (i / 8) & 0x0F);
}
for (int i = 0; i < 600; i += 4)
{
display.drawFastHLine(0, i, 800, (i / 8) & 0x0F);
}
displayCurrentAction("Drawing a grid using horizontal and vertical lines in different colors");
display.display();
delay(DELAY_MS);
//Draw rectangle at X = 200, Y = 200 and size of 400x300 pixels
display.clearDisplay();
display.drawRect(200, 200, 400, 300, 0); //Arguments are: start X, start Y, size X, size Y, color
displayCurrentAction("Drawing rectangle");
display.display();
delay(DELAY_MS);
//Draw rectangles on random location, size 100x150 pixels in random color
display.clearDisplay();
for (int i = 0; i < 50; i++)
{
display.drawRect(random(0, 799), random(0, 599), 100, 150, random(0, 7));
}
displayCurrentAction("Drawing many rectangles in random colors");
display.display();
delay(DELAY_MS);
//Draw filled black rectangle at X = 200, Y = 200, size of 400x300 pixels in gray color
display.clearDisplay();
display.fillRect(200, 200, 400, 300, 4); //Arguments are: start X, start Y, size X, size Y, color
displayCurrentAction("Drawing gray rectangle");
display.display();
delay(DELAY_MS);
//Draw filled random colored rectangles on random location, size of 30x30 pixels in radnom color
display.clearDisplay();
for (int i = 0; i < 50; i++)
{
display.fillRect(random(0, 799), random(0, 599), 30, 30, random(0, 7));
}
displayCurrentAction("Drawing many filled rectangles randomly in random colors");
display.display();
delay(DELAY_MS);
//Draw circle at center of a screen with radius of 75 pixels
display.clearDisplay();
display.drawCircle(400, 300, 75, 0); //Arguments are: start X, start Y, radius, color
displayCurrentAction("Drawing a circle");
display.display();
delay(DELAY_MS);
//Draw some random colored circles at random location with radius of 25 pixels in random color
display.clearDisplay();
for (int i = 0; i < 40; i++)
{
display.drawCircle(random(0, 799), random(0, 599), 25, random(0, 7));
}
displayCurrentAction("Drawing many circles randomly in random colors");
display.display();
delay(DELAY_MS);
//Draw black filled circle at center of a screen with radius of 75 pixels
display.clearDisplay();
display.fillCircle(400, 300, 75, 0); //Arguments are: start X, start Y, radius, color
displayCurrentAction("Drawing black-filled circle");
display.display();
delay(DELAY_MS);
//Draw some random colored filled circles at random location with radius of 15 pixels
display.clearDisplay();
for (int i = 0; i < 40; i++)
{
display.fillCircle(random(0, 799), random(0, 599), 15, random(0, 7));
}
displayCurrentAction("Drawing many filled circles randomly in random colors");
display.display(); //To show stuff on screen, you always need to call display.display();
delay(DELAY_MS);
//Draw rounded rectangle at X = 200, Y = 200 and size of 400x300 pixels and radius of 10 pixels
display.clearDisplay();
display.drawRoundRect(200, 200, 400, 300, 10, 0); //Arguments are: start X, start Y, size X, size Y, radius, color
displayCurrentAction("Drawing rectangle with rounded edges");
display.display();
delay(DELAY_MS);
//Draw rounded rectangles on random location, size 100x150 pixels, radius of 5 pixels in radnom color
display.clearDisplay();
for (int i = 0; i < 50; i++)
{
display.drawRoundRect(random(0, 799), random(0, 599), 100, 150, 5, random(0, 7));
}
displayCurrentAction("Drawing many rounded edges rectangles");
display.display();
delay(DELAY_MS);
//Draw filled random colored rectangle at X = 200, Y = 200, size of 400x300 pixels and radius of 10 pixels
display.clearDisplay();
display.fillRoundRect(200, 200, 400, 300, 10, 0); //Arguments are: start X, start Y, size X, size Y, radius, color
displayCurrentAction("Drawing filled rectangle with rounded edges");
display.display();
delay(DELAY_MS);
//Draw filled random colored rectangle on random location, size of 30x30 pixels, radius of 3 pixels in radnom color
display.clearDisplay();
for (int i = 0; i < 50; i++)
{
display.fillRoundRect(random(0, 799), random(0, 599), 30, 30, 3, random(0, 7));
}
displayCurrentAction("Drawing many filled rectangle with rounded edges in random colors");
display.display();
delay(DELAY_MS);
//Draw simple triangle
display.clearDisplay();
display.drawTriangle(250, 400, 550, 400, 400, 100, 0); //Arguments are: X1, Y1, X2, Y2, X3, Y3, color
display.display();
delay(DELAY_MS);
//Draw filled triangle inside simple triangle (so no display.clearDisplay() this time)
display.fillTriangle(300, 350, 500, 350, 400, 150, 0); //Arguments are: X1, Y1, X2, Y2, X3, Y3, color
displayCurrentAction("Drawing filled triangle inside exsisting one");
display.display();
delay(DELAY_MS);
//Display some grayscale image on screen. We are going to display e-radionica logo on display at location X = 100, Y = 100
//Image size is 500x332 pixels.
display.clearDisplay();
display.drawBitmap3Bit(100, 100, picture1, 500, 332); //Arguments are: start X, start Y, array variable name, size X, size Y
displayCurrentAction("Drawing a bitmap image");
display.display();
delay(DELAY_MS);
//Write some text on screen with different sizes and color
display.clearDisplay();
for (int i = 0; i < 6; i++)
{
display.setTextColor(i);
display.setTextSize(i + 1); //textSize parameter starts at 0 and goes up to 10 (larger won't fit Inkplate 6 screen)
display.setCursor(200, (i * i * 8)); //setCursor works as same as on LCD displays - sets "the cursor" at the place you want to write someting next
display.print("INKPLATE6!"); //The actual text you want to show on e-paper as String
}
displayCurrentAction("Text in different sizes and shadings");
display.display(); //To show stuff on screen, you always need to call display.display();
delay(DELAY_MS);
//Write same text on different location, but now invert colors (text is white, text background is black)
display.setTextColor(7, 0); //First argument is text color, while second argument is background color. In greyscale,
for (int i = 0; i < 6; i++)
{ //you are able to choose from 8 different colors (0-7)
display.setTextSize(i + 1);
display.setCursor(200, 300 + (i * i * 8));
display.print("INKPLATE6!");
}
display.display();
delay(DELAY_MS);
//Write text and rotate it by 90 deg. forever
int r = 0;
display.setTextSize(8);
display.setTextColor(7, 0);
while (true)
{
display.setCursor(100, 100);
display.clearDisplay();
display.setRotation(r); //Set rotation will sent rotation for the entire display, so you can use it sideways or upside-down
display.print("INKPLATE6");
display.display();
r++;
delay(DELAY_MS);
}
//Did you know that you can change between monochrome and greyscale mode anytime?
//Just call Inkplate display(INKPLATE_1BIT) or Inkplate display(INKPLATE_3BIT)
}
//Small function that will write on the screen what function is currently in demonstration.
void displayCurrentAction(String text)
{
display.setTextSize(2);
display.setCursor(2, 580);
display.print(text);
}

View File

@ -1,52 +0,0 @@
/*
3_Basic_partial_update example for e-radionica Inkplate 6
For this example you will need only USB cable and Inkplate 6
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
In this example we will show how to use partial update functionality of Inkplate 6 e-paper display.
It will scroll text that is saved in char array
NOTE: Partial update is only available on 1 Bit mode (Monochrome) and it is not recommended to use it on first refresh after power up.
It is recommended to do a full refresh every 5-10 partial refresh to maintain good picture quality.
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
Inkplate display(INKPLATE_1BIT); //Create an object on Inkplate library and also set library into 1-bit mode (Monochrome)
//Char array where you can store your text that will be scrolled.
const char text[] = "This is partial update on Inkplate 6 e-paper display! :)";
//This variable is used for moving the text (scrolling)
int offset = 800;
//Variable that keeps count on how much screen has been partially updated
int n = 0;
void setup() {
display.begin(); //Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); //Clear frame buffer of display
display.display(); //Put clear image on display
display.setTextColor(BLACK, WHITE); //Set text color to be black and background color to be white
display.setTextSize(4); //Set text to be 4 times bigger than classic 5x7 px text
display.setTextWrap(false); //Disable text wraping
}
void loop() {
display.clearDisplay(); //Clear content in frame buffer
display.setCursor(offset, 300); //Set new position for text
display.print(text); //Write text at new position
if(n>9) { //Check if you need to do full refresh or you can do partial update
display.display(); //Do a full refresh
n = 0;
}else{
display.partialUpdate(); //Do partial update
n++; //Keep track on how many times screen has been partially updated
}
offset-=20; //Move text into new position
if(offset<0) offset = 800; //Text is scrolled till the end of the screen? Get it back on the start!
delay(500); //Delay between refreshes.
}

View File

@ -1,54 +0,0 @@
/*
4_Basic_custom_font example for e-radionica.com Inkplate 6
For this example you will need only USB cable and Inkplate 6
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example will show you how to use custom fonts on Inkplate 6 thanks to Adafruit GFX
More on custom fonts in Adafruit GFX: https://learn.adafruit.com/adafruit-gfx-graphics-library/using-fonts
In this example, we will use already prebuilt .h font file.
If you want use your own fonts, you first need to convert it from .ttf to .h using online converter: https://rop.nl/truetype2gfx/
When you convert it, download .h file and put it inside sketch folder.
Include that file using #include macro and set font using setFont() function.
NOTE: When using custom fonts, you can't use background color. Also, start position of text is not in top left corner!
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
#include "Not_Just_Groovy20pt7b.h" //Include first .h font file to the sketch
#include "DSEG14Classic_Regular20pt7b.h" //Include second font
Inkplate display(INKPLATE_1BIT); //Create an object on Inkplate library and also set library into 1-bit mode (Monochrome)
void setup() {
display.begin(); //Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); //Clear frame buffer of display
display.display(); //Put clear image on display
display.setFont(&Not_Just_Groovy20pt7b); //Select new font
display.setTextSize(2); //Set font scaling to two (font will be 2 times bigger)
display.setCursor(0,60); //Set print cursor on X = 0, Y = 60
display.println("Inkplate 6"); //Print some text
display.setTextSize(1); //Set font scaling to one (font is now original size)
display.print("by e-radionica.com"); //Print text
display.setFont(&DSEG14Classic_Regular20pt7b); //Select second font
display.setCursor(0, 250); //Set print position on X = 0, Y = 250
display.println("Some old-school 14 segment"); //Print text
display.println("display font on e-paper");
display.print("display");
display.setFont(); //Use original 5x7 pixel fonts
display.setCursor(0, 550); //Set new print position at X = 0, Y = 550
display.setTextSize(3); //Set font scaling to three (font will be 3 times bigger)
display.print("Classic 5x7 px fonts"); //Print text
display.display(); //Display everything on display
}
void loop() {
//Nothing...
}

View File

@ -1,82 +0,0 @@
/*
1_Inkplate_WiFi_HTTP example for e-radionica.com Inkplate 6
For this example you will need USB cable, Inkplate 6 and stable WiFi Internet connection
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example will show you how to connect to WiFi network, get data from Internet and display that data on epaper.
This example is NOT on to how to parse HTML data from Internet - it will just print HTML on the screen.
In quotation marks you will need write your WiFi SSID and WiFi password in order to connect to your WiFi network.
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
#include <WiFi.h> //Include ESP32 WiFi library to our sketch
#include <HTTPClient.h> //Include HTTP library to this sketch
#define ssid "" //Name of the WiFi network (SSID) that you want to connect Inkplate to
#define pass "" //Password of that WiFi network
Inkplate display(INKPLATE_1BIT); //Create an object on Inkplate library and also set library into 1 Bit mode (Monochrome)
void setup() {
display.begin(); //Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); //Clear frame buffer of display
display.display(); //Put clear image on display
display.setTextSize(2); //Set text scaling to two (text will be two times bigger)
display.setCursor(0, 0); //Set print position
display.setTextColor(BLACK, WHITE); //Set text color to black and background color to white
display.println("Scanning for WiFi networks..."); //Write text
display.display(); //Send everything to display (refresh display)
int n = WiFi.scanNetworks(); //Start searching WiFi networks and put the nubmer of found WiFi networks in variable n
if (n == 0) { //If you did not find any network, show the message and stop the program.
display.print("No WiFi networks found!");
display.partialUpdate();
while (true);
} else {
if (n > 10) n = 0; //If you did find, print name (SSID), encryption and signal strength of first 10 networks
for (int i = 0; i < n; i++) {
display.print(WiFi.SSID(i));
display.print((WiFi.encryptionType(i) == WIFI_AUTH_OPEN) ? 'O' : '*');
display.print('\n');
display.print(WiFi.RSSI(i), DEC);
}
display.partialUpdate(); //(Partial) refresh thescreen
}
display.clearDisplay(); //Clear everything in frame buffer
display.setCursor(0,0); //Set print cursor to new position
display.print("Connecting to "); //Print the name of WiFi network
display.print(ssid);
WiFi.begin(ssid, pass); //Try to connect to WiFi network
while (WiFi.status() != WL_CONNECTED) {
delay(1000); //While it is connecting to network, display dot every second, just to know that Inkplate is alive.
display.print('.');
display.partialUpdate();
}
display.print("connected"); //If it's connected, notify user
display.partialUpdate();
HTTPClient http;
if(http.begin("http://example.com/index.html")) { //Now try to connect to some web page (in this example www.example.com. And yes, this is a valid Web page :))
if(http.GET()>0) { //If connection was successful, try to read content of the Web page and display it on screen
String htmlText;
htmlText = http.getString();
display.setTextSize(1); //Set smaller text size, so everything can fit on screen
display.clearDisplay();
display.setCursor(0, 0);
display.print(htmlText);
display.display();
}
}
}
void loop() {
//Nothing
}

View File

@ -1,102 +0,0 @@
/*
10_Inkplate_Download_And_Show example for e-radionica Inkplate6
For this example you will need a micro USB cable, Inkplate6, and an available WiFi connection.
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
You can open .bmp files that have color depth of 1 bit (monochrome bitmap), 4 bit, 8 bit and
24 bit AND have resoluton smaller than 800x600 or otherwise it won't fit on screen.
This example will show you how you can download a .bmp file (picture) from the web and
display that image on e-paper display.
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
23 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
#include "HTTPClient.h" //Include library for HTTPClient
#include "WiFi.h" //Include library for WiFi
Inkplate display(INKPLATE_1BIT); //Create an object on Inkplate library and also set library into 1 Bit mode (Monochrome)
const char* ssid = ""; //Your WiFi SSID
const char* password = ""; //Your WiFi password
void setup() {
display.begin(); //Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); //Clear frame buffer of display
display.display(); //Put clear image on display
display.print("Connecting to WiFi...");
display.partialUpdate();
//Connect to the WiFi network.
WiFi.mode(WIFI_MODE_STA);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
display.print(".");
display.partialUpdate();
}
display.println("\nWiFi OK! Downloading...");
display.partialUpdate();
//Draw the first image from web.
//Monochromatic bitmap with 1 bit depth. Images like this load quickest.
//NOTE: Both drawBitmapFromWeb methods allow for an optional fifth "invert" parameter. Setting this parameter to true
//will flip all colors on the image, making black white and white black. This may be necessary when exporting bitmaps from
//certain softwares.
//Forth parameter will dither the image.
//Photo taken by: Roberto Fernandez
if (!display.drawBitmapFromWeb("https://varipass.org/neowise_mono.bmp", 0, 0, false, true)) {
//If is something failed (wrong filename or wrong bitmap format), write error message on the screen.
//REMEMBER! You can only use Windows Bitmap file with color depth of 1, 4, 8 or 24 bits with no compression!
display.println("Image open error");
display.display();
}
display.display();
//Draw the second image from web, this time using a HTTPClient to fetch the response manually.
//Full color 24 bit images are large and take a long time to load, will take around 20 secs.
HTTPClient http;
//Set parameters to speed up the download process.
http.getStream().setNoDelay(true);
http.getStream().setTimeout(1);
//Photo taken by: Roberto Fernandez
http.begin("https://varipass.org/neowise.bmp");
//Check response code.
int httpCode = http.GET();
if (httpCode == 200) {
//Get the response length and make sure it is not 0.
int32_t len = http.getSize();
if (len > 0) {
if (!display.drawBitmapFromWeb(http.getStreamPtr(), 0, 0, len)) {
//If is something failed (wrong filename or wrong bitmap format), write error message on the screen.
//REMEMBER! You can only use Windows Bitmap file with color depth of 1, 4, 8 or 24 bits with no compression!
display.println("Image open error");
display.display();
}
display.display();
}
else {
display.println("Invalid response length");
display.display();
}
}
else {
display.println("HTTP error");
display.display();
}
http.end();
WiFi.mode(WIFI_OFF);
}
void loop() {
//Nothing...
}

View File

@ -1,50 +0,0 @@
/*
2_Inkplate_Low_Power example for e-radionica.com Inkplate 6
For this example you will need USB cable and Inkplate 6.
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example will show you how you can use low power functionality of Inkplate board.
In deep sleep, whole board will consume about 25uA from battery.
Inkplate will wake every 20 seconds change content on screen.
NOTE: Because we are using deep sleep, everytime the board wakes up, it starts program from begining.
Also, whole content from RAM gets erased, so you CAN NOT use partial updates.
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
#include "picture1.h" //Include .h files of 3 pictures. All three pictures were converted using LCD Image Converter software
#include "picture2.h"
#include "picture3.h"
#include "driver/rtc_io.h" //ESP32 library used for deep sleep and RTC wake up pins
const uint8_t* pictures[] = {pic1, pic2, pic3}; //This array of pinters holds address of every picture in the memory,
//so we can easly select it by selecting index in array
#define uS_TO_S_FACTOR 1000000 //Conversion factor for micro seconds to seconds
#define TIME_TO_SLEEP 20 //How long ESP32 will be in deep sleep (in seconds)
RTC_DATA_ATTR int slide = 0;
Inkplate display(INKPLATE_3BIT); //Create an object on Inkplate library and also set library into 3 Bit mode (Grayscale)
void setup() {
display.begin(); //Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); //Clear frame buffer of display
display.drawBitmap3Bit(0, 0, pictures[slide], 800, 600); //Display selected picture at location X=0, Y=0. All three pictures have resolution of 800x600 pixels
display.display(); //Refresh the screen with new picture
slide++; //Update counter for pictures. With this variable, we choose what picture is going to be displayed on screen
if (slide > 2) slide = 0; //We do not have more than 3 images, so roll back to zero
rtc_gpio_isolate(GPIO_NUM_12); //Isolate/disable GPIO12 on ESP32 (only to reduce power consumption in sleep)
esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR); //Activate wake-up timer -- wake up after 20s here
esp_deep_sleep_start(); //Put ESP32 into deep sleep. Program stops here.
}
void loop() {
//Nothing! If you use deep sleep, whole program should be in setup() because each time the board restarts, not in a loop()! loop() must be empty!
}

View File

@ -1,50 +0,0 @@
/*
3_Inkplate_Battery_Voltage_And_Temperature example for e-radionica Inkplate 6
For this example you will need USB cable, Inkplate 6 and a Lithium battery (3.6V) with two pin JST connector.
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example will show you how to read voltage of the battery and read temperature from on-board
temperature sensor which is part of TPS65186 e-paper PMIC.
NOTE: In order to read temperature, e-paper has to be refreshed at least one time,
or you have to power up epaper PMIC with einkOn() function from Inkplate library.
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
#include "symbols.h" //Include .h file that contains byte array for battery symbol and temperature symbol.
//It is in same folder as this sketch. You can even open it (read it) by clicking on symbols.h tab in Arduino IDE
Inkplate display(INKPLATE_1BIT); //Create an object on Inkplate library and also set library into 1-bit mode (Monochrome)
void setup() {
display.begin(); //Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); //Clear frame buffer of display
display.display(); //Put clear image on display
display.setTextSize(2); //Scale text to be two times bigger then original (5x7 px)
display.setTextColor(BLACK, WHITE); //Set text color to black and background color to white
}
void loop() {
int temperature;
float voltage;
temperature = display.readTemperature(); //Read temperature from on-board temperature sensor
voltage = display.readBattery(); //Read battery voltage (NOTE: Doe to ESP32 ADC accuracy, you should calibrate the ADC!)
display.clearDisplay(); //Clear everything in frame buffer of e-paper display
display.drawBitmap(100, 100, battSymbol, 106, 45, BLACK); //Draw battery symbol at position X=100 Y=100
display.setCursor(210, 120);
display.print(voltage, 2); //Print battery voltage
display.print('V');
display.drawBitmap(100, 200, tempSymbol, 38, 79, BLACK); //Draw temperature symbol at position X=100, Y=200
display.setCursor(150, 225);
display.print(temperature, DEC); //Print temperature
display.print('C');
display.display(); //Send everything to display (refresh the screen)
delay(10000); //Wait 10 seconds before new measurement
}

View File

@ -1,75 +0,0 @@
/*
4_Inkplate_Touchpads example for e-radionica.com Inkplate 6
For this example you will need only a micro USB cable and Inkplate 6.
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example will show you how you can use built-in touchpads (on PCB marked with numbers 1, 2 and 3).
These are basically touch sensitive switches. You can read state each of these with function readTouchpad()
and the argument you need to pass to this function is PAD1 if you want to read the state of touchpad marked
as "1" on PCB, PAD2 for second touchpad, PAD3 for third. You can also use numbers as arguments.
For that you need to pass number 0 for touchpad that is marked as 1 on PCB, 1 for second touchpad and 2 for third.
Function will return 1 if selected touchpad is pressed, zero if not.
In this example, if you touch first pad, ti will decrese number showed on screen, if you touch thirs touch pad,
it will increase the number, if you touch second touchpad, it will reset number to zero.
NOTE: You can not use touch pads when enclosure is fitted on the Inkplate - they are not that sensitive!
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
Inkplate display(INKPLATE_1BIT); //Create an object on Inkplate library and also set library into 1 Bit mode (Monochrome)
int number = 0; //Variable that stores our number
int n = 0; //Variable that keeps track on how many times display is partially updated
void setup() {
display.begin(); //Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); //Clear frame buffer of display
display.display(); //Put clear image on display
display.setTextSize(5); //Set text scaling to five (text will be five times bigger)
display.setTextColor(BLACK, WHITE); //Set text color to black and background color to white
displayNumber(); //Call our function to display nubmer on screen
}
void loop() {
if (display.readTouchpad(PAD1)) { //Check if first pad has been touched. If it is, decrement the number and refresh the screen.
number--;
displayNumber();
}
if (display.readTouchpad(PAD2)) { //If you touched second touchpad, set number to zero and refresh screen by calling our displayNumber() function
number = 0;
displayNumber();
}
if (display.readTouchpad(PAD3)) { //If you touched third touchpad, incerement the number and refresh the screen.
number++;
displayNumber();
}
delay(100); //Wait a little bit between readings.
}
//Function that will write you number to screen
void displayNumber() {
display.clearDisplay(); //First, lets delete everything from frame buffer
display.setCursor(385, 280); //Set print cursor at X=385, Y=280 (roughly in the middle of the screen)
display.print(number, DEC); //Print the number
display.setCursor(255, 560); //Set new print position (right above first touchpad)
display.print('-'); //Print minus sign
display.setCursor(385, 560); //Set new print position (right above second touchpad)
display.print('0'); //Print zero
display.setCursor(520, 560); //Set new print position (right above third touchpad)
display.print('+'); //Print plus sign
if (n > 20) { //Chech if screen has been partially refreshed more than 20 times. If it is, do a full refresh. If is not, do a partial refresh
display.display();
n = 0;
} else {
display.partialUpdate();
n++;
}
}

View File

@ -1,72 +0,0 @@
/*
5_Inkplate_SD_BMP example for e-radionica Inkplate6
For this example you will need a micro USB cable, Inkplate6 and a SD card loaded with
image1.bmp and image2.bmp file that can be found inside folder of this example.
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
To work with SD card on Inkplate, you will need to add one extra library.
Download and install it from here: https://github.com/e-radionicacom/Inkplate-6-SDFat-Arduino-Library
You can open .bmp files that have color depth of 1 bit (monochrome bitmap), 4 bit, 8 bit and
24 bit AND have resoluton smaller than 800x600 or otherwise it won't fit on screen.
Format your SD card in standard FAT fileformat.
This example will show you how you can read .bmp files (pictures) from SD card and
display that image on e-paper display.
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
#include "SdFat.h" //Include library for SD card
Inkplate display(INKPLATE_1BIT); //Create an object on Inkplate library and also set library into 1 Bit mode (Monochrome)
SdFile file; //Create SdFile object used for accessing files on SD card
void setup() {
Serial.begin(115200);
display.begin(); //Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); //Clear frame buffer of display
display.display(); //Put clear image on display
//Init SD card. Display if SD card is init propery or not.
if (display.sdCardInit()) {
display.println("SD Card OK! Reading image...");
display.partialUpdate();
//If card is properly init, try to load image and display it on e-paper at position X=0, Y=0
//NOTE: Both drawBitmapFromSD methods allow for an optional fourth "invert" parameter. Setting this parameter to true
//will flip all colors on the image, making black white and white black. This may be necessary when exporting bitmaps from
//certain softwares.
if (!display.drawBitmapFromSD("image1.bmp", 0, 0, 1)) {
//If is something failed (wrong filename or wrong bitmap format), write error message on the screen.
//REMEMBER! You can only use Windows Bitmap file with color depth of 1, 4, 8 or 24 bits with no compression!
//You can turn of dithering for somewhat faster image load by changing the last 1 to 0, or removing the 1 argument completely
display.println("Image open error");
display.display();
}
display.display();
}
else {
//If SD card init not success, display error on screen and stop the program (using infinite loop)
display.println("SD Card error!");
display.partialUpdate();
while (true);
}
delay(5000);
//Now try to load image using SdFat library class (for more advanced users) and display image on epaper.
if (file.open("image2.bmp", O_RDONLY)) {
display.drawBitmapFromSD(&file, 0, 0);
display.display();
}
}
void loop() {
//Nothing...
}

View File

@ -1,61 +0,0 @@
/*
6_Inkplate_SD_TXT example for e-radionica.com Inkplate 6
For this example you will need only a micro USB cable, Inkplate 6 and a SD card
loaded with text.txt file that can be found inside folder of this example.
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
To work with SD card on Inkplate, you will need to add one extra library.
Download and install it from here: https://github.com/e-radionicacom/Inkplate-6-SDFat-Arduino-Library
You can open your own .txt file, but in order to this example works properly it should
not have more than 200 chars and you should name it text.txt
This example will show you how to open .txt files and display the content of that file on Inkplate epaper display.
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
#include "SdFat.h" //Include library for SD card
Inkplate display(INKPLATE_1BIT); //Create an object on Inkplate library and also set library into 1 Bit mode (Monochrome)
SdFile file; //Create SdFile object used for accessing files on SD card
void setup() {
display.begin(); //Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); //Clear frame buffer of display
display.display(); //Put clear image on display
//Init SD card. Display if SD card is init propery or not.
if (display.sdCardInit()) {
display.println("SD Card ok! Reading data...");
display.partialUpdate();
//Try to load text with max lenght of 200 chars.
if (!file.open("/text.txt", O_RDONLY)) { //If it fails to open, send error message to display, otherwise read the file.
display.println("File open error");
display.display();
} else {
display.clearDisplay(); //Clear everything that is stored in frame buffer of epaper
display.setCursor(0,0); //Set print position at the begining of the screen
char text[201]; //Array where data from SD card is stored (max 200 chars here)
int len = file.fileSize(); //Read how big is file that we are opening
if(len>200) len = 200; //If it's more than 200 bytes (200 chars), limit to max 200 bytes
file.read(text, len); //Read data from file and save it in text array
text[len] = 0; //Put null terminating char at the and of data
display.print(text); //Print data/text
display.display(); //Do a full refresh of display
}
} else { //If card init was not successful, display error on screen and stop the program (using infinite loop)
display.println("SD Card error!");
display.partialUpdate();
while (true);
}
}
void loop() {
//Nothing...
}

View File

@ -1,85 +0,0 @@
/*
7_Inkplate_easyC example for e-radionica.com Inkplate 6
For this example you will need a micro USB cable, Inkplate 6,
BME680 sensor with easyC connector on it: https://e-radionica.com/en/bme680-breakout-made-by-e-radionica.html
and a easyC cable: https://e-radionica.com/en/easyc-cable-20cm.html
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example will show you how you can read temperature, humidity, air pressure and gas data from BME680.
In order to compile this example successfuly, you will also need to download and install
Adafruit BME680 library: https://github.com/adafruit/Adafruit_BME680
and Adafruit Sensor library ( https://github.com/adafruit/Adafruit_Sensor ).
If you don't know how to install library you can read our tutorial https://e-radionica.com/en/blog/arduino-library/
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
#include <Adafruit_Sensor.h> //Adafruit library for sensors
#include "Adafruit_BME680.h" //Adafruit library for BME680 Sensor
Inkplate display(INKPLATE_1BIT); //Create an object on Inkplate library and also set library into 1 Bit mode (Monochrome)
Adafruit_BME680 bme; //Create an object on Adafruit BME680 library
//(with no arguments sent to constructor, that means we are using I2C communication for BME680 sensor)
int n = 0; //Variable that keep track on how many times screen has been partially updated
void setup() {
display.begin(); //Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); //Clear frame buffer of display
display.display(); //Put clear image on display
display.setTextSize(2); //Set text scaling to two (text will be two times bigger than normal)
if (!bme.begin(0x76)) { //Init. BME680 library. e-radionica.com BME680 sensor board uses 0x76 I2C address for sensor
display.println("Sensor init failed!");
display.println("Check sensor wiring/connection!");
display.partialUpdate();
while (1);
}
//Set up oversampling and filter initialization for the sensor
bme.setTemperatureOversampling(BME680_OS_8X);
bme.setHumidityOversampling(BME680_OS_2X);
bme.setPressureOversampling(BME680_OS_4X);
bme.setIIRFilterSize(BME680_FILTER_SIZE_3);
bme.setGasHeater(320, 150); // 320*C for 150 ms
}
void loop() {
if (!bme.performReading()) { //If sending command to start reading data fails, send error message to display
display.clearDisplay();
display.setCursor(0, 0);
display.print("Failed to read data from sensor");
display.partialUpdate();
} else { //Otherwise, clear frame buffer of epaper display
display.clearDisplay(); //Print out new data
display.setCursor(0, 0);
display.print("Air temperature: ");
display.print(bme.temperature);
display.println(" *C");
display.print("Air pressure: ");
display.print(bme.pressure / 100.0);
display.println(" hPa");
display.print("Air humidity: ");
display.print(bme.humidity);
display.println(" %");
display.print("Gas sensor resistance: ");
display.print(bme.gas_resistance / 1000.0);
display.println(" kOhms");
if(n>20) { //If display has been partially updated more than 20 times, do a full refresh, otherwise, perform a partial update.
display.display();
n = 0;
}else{
display.partialUpdate();
n++;
}
}
delay(2000); //Wait a little bit between readings
}

View File

@ -1,43 +0,0 @@
/*
8_Inkplate_MCP23017 example for e-radionica.com Inkplate 6
For this example you will need only a micro USB cable, Inkplate6, 330 Ohm resistor and LED diode.
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
Connect resistor to GPB7 pin on MCP23017 header at bottom right corner on the backside (component side) of Inkplate.
You will have to connect one side of 330 Ohm resistor to GPB7, than other side to anode of LED and finally, cathode pin of LED to GND.
This example will show you how you can manipulate with I/Os of MCP23017 Expander.
You can only manipulate with Port B of MCP23017 (GPB1-GPB7). Port A is used for epaper panel and TPS65186 PMIC.
GPB0 is used for ESP32 GPIO0 so you can't use it either.
GPB1 is used for enabling battery reading (if Batt solder bridge is bridged between second and third pad)
GPB2, GPB3 and GPB4 are used for reading touchpad (if Touchpad solder bridges are bridged between second pad and third pad).
If every thing is connected ok, after you upload code, LED should blink.
DANGER: DO NOT USE GPA0-GPA7 and GPB0. In code those are pins from 0-8!!! Using those, you might permanently damage the screen.
You should only use pins from 9-15.
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
#define LED_PIN 15 //We are going to use pin GPB7 (remember! GPA0 = 0, GPA1 = 1, ..., GPA7 = 7, GPB0 = 8, GBP1 = 9, ..., GPB7 = 15)
Inkplate display(INKPLATE_1BIT); //Create an object on Inkplate library and also set library into 1-bit mode (Monochrome)
extern Adafruit_MCP23017 mcp; //We are using mcp object used inside our Inkplate library
void setup() {
display.begin(); //Init Inkplate library (you should call this function ONLY ONCE)
mcp.pinMode(LED_PIN, OUTPUT); //Set pin 15 (or GPB7) to output. On that pin, we sholud connect LED with current limiting resistor
}
void loop() {
mcp.digitalWrite(LED_PIN, LOW); //Set output to low (LED does not light up)
delay(1000); //Wait for one second
mcp.digitalWrite(LED_PIN, HIGH); //Set output to high (LED lights up)
delay(1000); //Wait for one second
}

View File

@ -1,93 +0,0 @@
/*
10_Inkplate_Web_Server example for e-radionica.com Inkplate 6
For this example you will need a micro USB cable, Inkplate 6 and a device with WiFi and Internet brower (PC, Laptop, Smartphone, ...).
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example will show you how you can use Inkplate as a small and simple standlone Web Server.
You need to connect to Inkplate with WiFi and open IP address shown on Inkplate display.
After opening IP address, you will se text box where you can type some text and after that you press "Send to display".
Text will apper on Inkplate display!
This is just simple example what you can do with it and of course, you can create much more complex stuff.
HINT: You can change WiFi name and password of your Inkplate WIFi Access point by changing ssid and pass in #define macros!
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include <WiFi.h> //Include ESP32 WiFi library
#include <WiFiClient.h> //Include ESP32 WiFi library for AP
#include <WebServer.h> //Include ESP32 library for Web server
#include "Inkplate.h" //Include Inkplate library to the sketch
#include "htmlCode.h" //Include .h file where we stored out html code of our web page
#define ssid "Inkplate6"
#define pass "e-radionica"
Inkplate display(INKPLATE_1BIT); //Create an object on Inkplate library and also set library into 1 Bit mode (Monochrome)
WebServer server(80); //Create Web server on port 80 (HTTP port number)
IPAddress serverIP;
String txt;
void setup() {
display.begin(); //Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); //Clear frame buffer of display
display.display(); //Put clear image on display
display.setTextSize(3); //Scale text to be two times bigger then original (5x7 px)
display.setTextColor(BLACK, WHITE); //Set text color to black and background color to white
display.setTextWrap(true); //If text does not fit on screen, send it to new line
WiFi.begin(); //Init. WiFi library
WiFi.mode(WIFI_AP); //Set WiFi to Access point mode
WiFi.softAP(ssid, pass); //Set SSID (WiFi name) and password for Access point
serverIP = WiFi.softAPIP(); //Get the server IP address
server.on("/", handleRoot); //If you open homepage, go to handle root function
server.on("/string/{}", handleString); //If you send some text to Inkplate, go to handleString function. Note that {} brackets at the end of address. That means that web address has some arguments (our text!).
server.begin(); //Start the web server
updatePaper();
}
void loop() {
server.handleClient(); //You have to constantly read if there is any new client connected to web server
}
void updateHTML() { //This function will send response to client and send HTML code of our web page
server.send(200, "text/html", s);
}
void handleRoot() { //This function will send response to client if client open a root (homepage) of our web page
updateHTML();
}
void handleString() { //This function will send response to client, send HTML code of web page, get the text from argument sent in web page address and refresh screen with new text
txt = server.arg(0);
updateHTML();
updatePaper();
}
void updatePaper() { //This function updates screen with new data (text)
display.clearDisplay(); //Clear everything from epaper frame buffer
display.setCursor(20, 40); //Print out instruction on how to connect to Inkplate WiFi and how to open a web page
display.print("Connect to ");
display.print(ssid);
display.println(" WiFi with pass: ");
display.setCursor(240, 100);
display.println(pass);
display.setCursor(100, 150);
display.print("Open Your web browser and open");
display.setCursor(240, 210);
display.print("http://");
display.print(serverIP);
display.println('/');
display.println();
display.fillRect(10, 240, 780, 4, BLACK);
display.println("User text:"); //Print out what user typed in web page
display.print(txt);
display.display(); //Send everything to screen (refresh the screen)
}

View File

@ -1,39 +0,0 @@
#include "Arduino.h"
#include <WiFi.h>
#include <HTTPClient.h>
#include <WiFiClientSecure.h>
// To get timeZone from main file
extern int timeZone;
// wifi ssid and password
extern char *ssid;
extern char *pass;
#ifndef NETWORK_H
#define NETWORK_H
// All functions defined in Network.cpp
class Network
{
public:
// Functions we can access in main file
void begin(char *city);
void getTime(char *timeStr);
void getData(char *city, char *temp1, char *temp2, char *temp3, char *temp4, char *currentTemp, char *currentWind, char *currentTime, char *currentWeather, char *currentWeatherAbbr, char* abbr1, char* abbr2, char* abbr3, char* abbr4);
void getDays(char *day, char *day1, char *day2, char *day3);
// Used to store loaction woeid (world id), set in findCity()
int location = -1;
private:
// Functions called from within our class
void setTime();
void findCity(char *city);
};
#endif

View File

@ -1,46 +0,0 @@
#include "Arduino.h"
#include "Inkplate.h"
#include <WiFi.h>
#include <HTTPClient.h>
#include <WiFiClientSecure.h>
//To get timeZone from main file
extern int timeZone;
//wifi ssid and password
extern char *ssid;
extern char *pass;
extern char *lon;
extern char *lat;
extern char *apiKey;
extern Inkplate display;
#ifndef NETWORK_H
#define NETWORK_H
//All functions defined in Network.cpp
class Network
{
public:
//Functions we can access in main file
void begin(char *city);
void getTime(char *timeStr);
bool getData(char *city, char *temp1, char *temp2, char *temp3, char *temp4, char *currentTemp, char *currentWind, char *currentTime, char *currentWeather, char *currentWeatherAbbr, char *abbr1, char *abbr2, char *abbr3, char *abbr4);
void getHours(char *hour1, char *hour2, char *hour3, char *hour4);
//Used for storing retrieved data timestamp
time_t dataEpoch = 0;
private:
//Functions called from within our class
void setTime();
};
#endif

View File

@ -1,32 +0,0 @@
#include "Arduino.h"
#include <WiFi.h>
#include <HTTPClient.h>
#include <WiFiClientSecure.h>
// To get timeZone from main file
extern int timeZone;
// Wifi ssid and password
extern char *ssid;
extern char *pass;
#ifndef NETWORK_H
#define NETWORK_H
// All functions defined in Network.cpp
class Network
{
public:
// Functions we can access in main file
void begin();
void getTime(char *timeStr);
bool getData(double *data);
private:
// Functions called from within our class
void setTime();
};
#endif

View File

@ -1,34 +0,0 @@
#include "Arduino.h"
#include <WiFi.h>
#include <HTTPClient.h>
#include <WiFiClientSecure.h>
// To get timeZone from main file
extern int timeZone;
// Wifi ssid and password
extern char *ssid;
extern char *pass;
extern char *calendarURL;
#ifndef NETWORK_H
#define NETWORK_H
// All functions defined in Network.cpp
class Network
{
public:
// Functions we can access in main file
void begin();
void getTime(char *timeStr, long offset = 0);
bool getData(char *data);
private:
// Functions called from within our class
void setTime();
};
#endif

View File

@ -1,338 +0,0 @@
/*
Inkplate_Slave_Mode sketch for e-radionica.com Inkplate 6
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
Using this sketch, you don't have to program and control e-paper using Arduino code.
Instead, you can send UART command (explained in documentation that can be found inside folder of this sketch).
This give you flexibility that you can use this Inkplate 6 on any platform!
Because it uses UART, it's little bit slower and it's not recommended to send bunch of
drawPixel command to draw some image. Instead, load bitmaps and pictures on SD card and load image from SD.
If we missed some function, you can modify this and make yor own.
Also, every Inkplate comes with this slave mode right from the factory.
Learn more about Slave Mode in this update: https://www.crowdsupply.com/e-radionica/inkplate-6/updates/successfully-funded-also-third-party-master-controllers-and-partial-updates
UART settings are: 115200 baud, standard parity, ending with "\n\r" (both)
You can send commands via USB port or by directly connecting to ESP32 TX and RX pins.
Don't forget you need to send #L(1)* after each command to show it on the display
(equal to display.display()).
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include <Inkplate.h>
Inkplate display(INKPLATE_1BIT);
#define BUFFER_SIZE 1000
char commandBuffer[BUFFER_SIZE + 1];
char strTemp[2001];
void setup() {
display.begin();
Serial.begin(115200);
memset(commandBuffer, 0, BUFFER_SIZE);
}
void loop() {
// put your main code here, to run repeatedly:
if (Serial.available()) {
while (Serial.available()) {
for (int i = 0; i < (BUFFER_SIZE - 1); i++) {
commandBuffer[i] = commandBuffer[i + 1];
}
commandBuffer[BUFFER_SIZE - 1] = Serial.read();
}
}
char *s = NULL;
char *e = NULL;
for (int i = 0; i < BUFFER_SIZE; i++) {
if (commandBuffer[i] == '#' && s == NULL) s = &commandBuffer[i];
if (commandBuffer[i] == '*' && e == NULL) e = &commandBuffer[i];
}
if (s != NULL && e != NULL) {
if ((e - s) > 0) {
int x, x1, x2, y, y1, y2, x3, y3, l, c, w, h, r, n;
char b;
char temp[150];
switch (*(s + 1)) {
case '?':
Serial.print("OK");
break;
case '0':
sscanf(s + 3, "%d,%d,%d", &x, &y, &c);
//sprintf(temp, "display.drawPixel(%d, %d, %d)\n\r", x, y, c);
//Serial.print(temp);
display.drawPixel(x, y, c);
break;
case '1':
sscanf(s + 3, "%d,%d,%d,%d,%d", &x1, &y1, &x2, &y2, &c);
//sprintf(temp, "display.drawLine(%d, %d, %d, %d, %d)\n\r", x1, y1, x2, y2, c);
//Serial.print(temp);
display.drawLine(x1, y1, x2, y2, c);
break;
case '2':
sscanf(s + 3, "%d,%d,%d,%d", &x, &y, &l, &c);
//sprintf(temp, "display.drawFastVLine(%d, %d, %d, %d)\n\r", x, y, l, c);
//Serial.print(temp);
display.drawFastVLine(x, y, l, c);
break;
case '3':
sscanf(s + 3, "%d,%d,%d,%d", &x, &y, &l, &c);
//sprintf(temp, "display.drawFastHLine(%d, %d, %d, %d)\n\r", x, y, l, c);
//Serial.print(temp);
display.drawFastHLine(x, y, l, c);
break;
case '4':
sscanf(s + 3, "%d,%d,%d,%d,%d", &x, &y, &w, &h, &c);
//sprintf(temp, "display.drawRect(%d, %d, %d, %d, %d)\n\r", x, y, w, h, c);
//Serial.print(temp);
display.drawRect(x, y, w, h, c);
break;
case '5':
sscanf(s + 3, "%d,%d,%d,%d", &x, &y, &r, &c);
//sprintf(temp, "display.drawCircle(%d, %d, %d, %d)\n\r", x, y, r, c);
//Serial.print(temp);
display.drawCircle(x, y, r, c);
break;
case '6':
sscanf(s + 3, "%d,%d,%d,%d,%d,%d,%d", &x1, &y1, &x2, &y2, &x3, &y3, &c);
//sprintf(temp, "display.drawTriangle(%d, %d, %d, %d, %d, %d, %d)\n\r", x1, y1, x2, y2, x3, y3, c);
//Serial.print(temp);
display.drawTriangle(x1, y1, x2, y2, x3, y3, c);
break;
case '7':
sscanf(s + 3, "%d,%d,%d,%d,%d,%d", &x, &y, &w, &h, &r, &c);
//sprintf(temp, "display.drawRoundRect(%d, %d, %d, %d, %d, %d)\n\r", x, y, w, h, r, c);
//Serial.print(temp);
display.drawRoundRect(x, y, w, h, r, c);
break;
case '8':
sscanf(s + 3, "%d,%d,%d,%d,%d", &x, &y, &w, &h, &c);
//sprintf(temp, "display.fillRect(%d, %d, %d, %d, %d)\n\r", x, y, w, h, c);
//Serial.print(temp);
display.fillRect(x, y, w, h, c);
break;
case '9':
sscanf(s + 3, "%d,%d,%d,%d", &x, &y, &r, &c);
//sprintf(temp, "display.fillCircle(%d, %d, %d, %d)\n\r", x, y, r, c);
//Serial.print(temp);
display.fillCircle(x, y, r, c);
break;
case 'A':
sscanf(s + 3, "%d,%d,%d,%d,%d,%d,%d", &x1, &y1, &x2, &y2, &x3, &y3, &c);
//sprintf(temp, "display.fillTriangle(%d, %d, %d, %d, %d, %d, %d)\n\r", x1, y1, x2, y2, x3, y3, c);
//Serial.print(temp);
display.fillTriangle(x1, y1, x2, y2, x3, y3, c);
break;
case 'B':
sscanf(s + 3, "%d,%d,%d,%d,%d,%d", &x, &y, &w, &h, &r, &c);
//sprintf(temp, "display.fillRoundRect(%d, %d, %d, %d, %d, %d)\n\r", x, y, w, h, r, c);
//Serial.print(temp);
display.fillRoundRect(x, y, w, h, r, c);
break;
case 'C':
sscanf(s + 3, "\"%2000[^\"]\"", strTemp);
n = strlen(strTemp);
for (int i = 0; i < n; i++) {
strTemp[i] = toupper(strTemp[i]);
}
for (int i = 0; i < n; i += 2) {
strTemp[i / 2] = (hexToChar(strTemp[i]) << 4) | (hexToChar(strTemp[i + 1]) & 0x0F);
}
strTemp[n / 2] = 0;
//Serial.print("display.print(\"");
//Serial.print(strTemp);
//Serial.println("\");");
display.print(strTemp);
break;
case 'D':
sscanf(s + 3, "%d", &c);
//sprintf(temp, "display.setTextSize(%d)\n", c);
//Serial.print(temp);
display.setTextSize(c);
break;
case 'E':
sscanf(s + 3, "%d,%d", &x, &y);
//sprintf(temp, "display.setCursor(%d, %d)\n", x, y);
//Serial.print(temp);
display.setCursor(x, y);
break;
case 'F':
sscanf(s + 3, "%c", &b);
//sprintf(temp, "display.setTextWrap(%s)\n", b == 'T' ? "True" : "False");
//Serial.print(temp);
if (b == 'T') display.setTextWrap(true);
if (b == 'F') display.setTextWrap(false);
break;
case 'G':
sscanf(s + 3, "%d", &c);
c &= 3;
//sprintf(temp, "display.setRotation(%d)\n", c);
//Serial.print(temp);
display.setRotation(c);
break;
case 'H':
sscanf(s + 3, "%d,%d,\"%149[^\"]\"", &x, &y, strTemp);
n = strlen(strTemp);
for (int i = 0; i < n; i++) {
strTemp[i] = toupper(strTemp[i]);
}
for (int i = 0; i < n; i += 2) {
strTemp[i / 2] = (hexToChar(strTemp[i]) << 4) | (hexToChar(strTemp[i + 1]) & 0x0F);
}
strTemp[n / 2] = 0;
r = display.sdCardInit();
if (r) {
r = display.drawBitmapFromSD(strTemp, x, y);
Serial.print("#H(");
Serial.print(r, DEC);
Serial.println(")*");
Serial.flush();
//sprintf(temp, "display.drawBitmap(%d, %d, %s)\n", x, y, strTemp);
//Serial.print(temp);
} else {
Serial.println("#H(-1)*");
Serial.flush();
}
break;
case 'I':
sscanf(s + 3, "%d", &c);
//sprintf(temp, "display.setDisplayMode(%s)\n", c == 0 ? "INKPLATE_1BIT" : "INKPLATE_3BIT");
//Serial.print(temp);
if (c == INKPLATE_1BIT) display.selectDisplayMode(INKPLATE_1BIT);
if (c == INKPLATE_3BIT) display.selectDisplayMode(INKPLATE_3BIT);
break;
case 'J':
sscanf(s + 3, "%c", &b);
if (b == '?') {
//if (0 == 0) {
// Serial.println("#J(0)*");
//} else {
// Serial.println("#J(1)*");
//}
if (display.getDisplayMode() == INKPLATE_1BIT) {
Serial.println("#J(0)*");
Serial.flush();
}
if (display.getDisplayMode() == INKPLATE_3BIT) {
Serial.println("#J(1)*");
Serial.flush();
}
}
break;
case 'K':
sscanf(s + 3, "%c", &b);
if (b == '1') {
//Serial.print("display.clearDisplay();\n");
display.clearDisplay();
}
break;
case 'L':
sscanf(s + 3, "%c", &b);
if (b == '1') {
//Serial.print("display.display();\n");
display.display();
}
break;
case 'M':
sscanf(s + 3, "%d,%d,%d", &y1, &x2, &y2);
//sprintf(temp, "display.partialUpdate(%d, %d, %d);\n", y1, x2, y2);
//Serial.print(temp);
display.partialUpdate();
break;
case 'N':
sscanf(s + 3, "%c", &b);
if (b == '?') {
Serial.print("#N(");
Serial.print(display.readTemperature(), DEC);
//Serial.print(23, DEC);
Serial.println(")*");
Serial.flush();
}
break;
case 'O':
sscanf(s + 3, "%d", &c);
if (c >= 0 && c <= 2) {
Serial.print("#O(");
Serial.print(display.readTouchpad(c), DEC);
//Serial.print(0, DEC);
Serial.println(")*");
Serial.flush();
}
break;
case 'P':
sscanf(s + 3, "%c", &b);
if (b == '?') {
Serial.print("#P(");
Serial.print(display.readBattery(), 2);
//Serial.print(3.54, 2);
Serial.println(")*");
Serial.flush();
}
break;
case 'Q':
sscanf(s + 3, "%d", &c);
c &= 1;
//if (c == 0) Serial.print("display.einkOff();\n");
//if (c == 1) Serial.print("display.einkOn();\n");
if (c == 0) display.einkOff();
if (c == 1) display.einkOn();
break;
case 'R':
sscanf(s + 3, "%c", &b);
if (b == '?') {
Serial.print("#R(");
Serial.print(display.getPanelState(), DEC);
//Serial.print(1, DEC);
Serial.println(")*");
Serial.flush();
}
break;
}
*s = 0;
*e = 0;
}
}
}
int hexToChar(char c) {
if (c >= '0' && c <= '9')
return c - '0';
if (c >= 'A' && c <= 'F')
return c - 'A' + 10;
if (c >= 'a' && c <= 'f')
return c - 'a' + 10;
return -1;
}

View File

@ -1,175 +0,0 @@
Slave mode for Inkplate 6 by e-radionica.com
Slave mode is uploaded to each Inkplate 6. It enables you to use the board
without reprogramming. You just need to send commands via UART and it will
show contents on its screen.
You can send commands via USB port or by directly connecting to ESP32 TX and RX pins.
Don't forget you need to send #L(1)* after each command to show it on the display (equal to display.display()).
Settings are:
115200 baud, standard parity, ending with \n\r
echo: #?*
Check if the Inkplate receives commands on UART
response: OK
drawPixel: #0(XXX,YYY,CC)*
XXX - X coordinate (with leading zeros)
YYY - Y coordinate (with leading zeros)
CC - Color (with leading zeros)
example #0(001,005,04)*
drawLine: #1(XXX,YYY,III,JJJ,CC)*
XXX - Start x coordinate (with leading zeros)
YYY - Start y coordinate (with leading zeros)
III - End x coordinate (with leading zeros)
JJJ - End y coordinate (with leading zeros)
CC - Color (with leading zeros)
example #1(001,004,010,123,01)*
drawFastVLine: #2(XXX,YYY,LLL,CC)*
XXX - Start x coordinate (with leading zeros)
YYY - Start y coordinate (with leading zeros)
LLL - Length of line (with leading zeros)
CC - Solor (with leading zeros)
example #2(142,425,040,05)*
drawFastHLine: #3(XXX,YYY,LLL,CC)*
XXX - Start x coordinate (with leading zeros)
YYY - Start y coordinate (with leading zeros)
LLL - Length of line (with leading zeros)
CC - Color (with leading zeros)
example #3(123,014,100,03)*
drawRect: #4(XXX,YYY,WWW,HHH,CC)*
XXX - Start x coordinate (with leading zeros)
YYY - Start y coordinate (with leading zeros)
WWW - Width of rect. (with leading zeros)
HHH - Height of rect. (with leading zeros)
CC - Color (with leading zeros)
example #4(123,014,050,010,01)*
drawCircle: #5(XXX,YYY,RRR,CC)*
XXX - Start x coordinate (with leading zeros)
YYY - Start y coordinate (with leading zeros)
RRR - Radius of circle (with leading zeros)
CC - Color (with leading zeros)
example #5(050,100,040,01)*
drawTriangle: #6(XX1,YY1,XX2,YY2,XX3,YY3,CC)*
XX1 - X coordinate of first corner (with leading zeros)
YY1 - Y coordinate of first corner (with leading zeros)
XX2 - X coordinate of second corner (with leading zeros)
YY2 - Y coordinate of second corner (with leading zeros)
XX3 - X coordinate of third corner (with leading zeros)
YY3 - Y coordinate of third corner (with leading zeros)
CC - Color (with leading zeros)
example #6(250,250,100,400,375,450,04)*
drawRoudRect: #7(XXX,YYY,WWW,HHH,RRR,CC)*
XXX - Start x coordinate (with leading zeros)
YYY - Start y coordinate (with leading zeros)
WWW - Width of rect. (with leading zeros)
HHH - Height of rect. (with leading zeros)
RRR - Radius (with leading zeros)
CC - Color (with leading zeros)
example #7(123,014,050,010,005,00)*
fillRect: #8(XXX,YYY,WWW,HHH,CC)*
XXX - Start x coordinate (with leading zeros)
YYY - Start y coordinate (with leading zeros)
WWW - Width of rect. (with leading zeros)
HHH - Height of rect. (with leading zeros)
CC - Color (with leading zeros)
example #8(123,014,050,010,01)*
fillCircle: #9(XXX,YYY,RRR,CC)*
XXX - Start x coordinate (with leading zeros)
YYY - Start y coordinate (with leading zeros)
RRR - Radius of circle (with leading zeros)
CC - Color (with leading zeros)
example #9(050,100,040,01)*
fillTriangle: #A(XX1,YY1,XX2,YY2,XX3,YY3,CC)*
XX1 - X coordinate of first corner (with leading zeros)
YY1 - Y coordinate of first corner (with leading zeros)
XX2 - X coordinate of second corner (with leading zeros)
YY2 - Y coordinate of second corner (with leading zeros)
XX3 - X coordinate of third corner (with leading zeros)
YY3 - Y coordinate of third corner (with leading zeros)
CC - Color (with leading zeros)
example #A(250,250,100,400,375,450,04)*
fillRoudRect: #B(XXX,YYY,WWW,HHH,RRR,CC)*
XXX - Start x coordinate (with leading zeros)
YYY - Start y coordinate (with leading zeros)
WWW - Width of rect. (with leading zeros)
HHH - Height of rect. (with leading zeros)
RRR - Radius (with leading zeros)
CC - Color (with leading zeros)
example #B(123,014,050,010,005,00)*
print: #C("STRING")*
STRING - Text/Strig coded in HEX Char (example: HELLO WORLD would be coded like 48454c4c4f20574f524c44, where 48 means 0x48 which is H in ASCII table)
example for HELLO WORLD #C("48454c4c4f20574f524c44")*
setTextSize: #D(NN)*
NNN - Text scaling (with leading zeros)
example #D(02)*
setCursor: #E(XXX,YYY)*
XXX - X position of text cursor (with leading zeros)
YYY - Y position of text cursor (with leading zeros)
example #E(002,010)*
setTextWrap: #F(T/F)*
T - True if enable text wraping
F - False if disable text wraping
example #F(T)* or #F(F)*
setRotation: #G(RRR)*
RRR - Sets rotation (0-3, where each increment rotates whole screen by 90 deg)
example #G(003)*
drawBitmap: #H(XXX,YYY,"PATH")*
XXX - X position of bitmap on display
YYY - Y position of bitmap on display
PATH - path to bitmap image on SD card, where path should be sent as HEX Char (same as for print command). Example: /image1.bmp should be sent as 2f696d616765312e626d70
example: #H(000,000,"2f696d616765312e626d70")* where 2f696d616765312e626d70 means /image1.bmp
response: #H(1)* - Image loaded succesfully
#H(0)* - Image load failed
#H(-1)* - SD Card Init Error
setDisplayMode: #I(D)*
D - Display Mode (D = 3 -> 3 bit mode, D = 1 -> 1 bit mode)
example: #I(3)* or #I(1)*
getDisplayMode: #J(?)*
Response: #J(1)* - 3 bit mode
#J(0)* - 1 bit mode
clearDisplay: #K(1)*
display: #L(1)*
partialUpdate: #M(YY1, XX2, YY2)*
YY1 - Start Y position of part of the screen that will be updated
XX2 - End X position of part of the screen that will be updated
YY2 - End Y position of part of the screen that will be updated
example: #M(005,400,040)*
readTemperature: #N(?)*
response: #N(23)* - 23 Celsius degrees
readTouchpad: #O(P)*
P - Name of pad that needs to be read (1, 2 or 3)
resposne: #O(1)* for high state of pad or #O(0)* for low state of pad
readBattery: #P(?)*
response: #P(3.65)* - Measured voltage on battery is 3.65VDC
panelSupply(einkOff/on):#Q(S)*
S - State of panel power supply (S = 1 -> panel has power supply, S = 0 -> panel power supply has benn turned off)
getPanelState: #R(?)*
response: #R(1)* - panel has power supply or #R(0)* - panel supply has been turned off

View File

@ -1,73 +0,0 @@
/*
3-Inkplate_VariPass_Graphs example for e-radionica Inkplate6
For this example you will need a micro USB cable, Inkplate6, and an available WiFi connection.
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example will show you how you can use the API on the VariPass website to download and display
a sensor graph on the e-paper display.
VariPass is a website which allows you to host various online "variables" which you can write to
and read from using the VariPass API. This allows you to store sensor logs and later retrieve them
for graphing, analysis, etc.
This example uses an already public variable as an example. The graph is fed every minute with data
from Thorinair's (https://github.com/Thorinair/) geiger counter, so each startup of the Inkplate will
display updated values.
To learn more about VariPass and how you can use it for your own projects, please visit: https://varipass.org/
If you want to easily integrate the read/write functionality in your project, use the official library:
https://github.com/Thorinair/VariPass-for-ESP8266-ESP32
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
23 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
#include "WiFi.h" //Include library for WiFi
Inkplate display(INKPLATE_1BIT); //Create an object on Inkplate library and also set library into 1 Bit mode (Monochrome)
const char* ssid = "YourWiFiSSID"; //Your WiFi SSID
const char* password = "YourPass"; //Your WiFi password
void setup() {
display.begin(); //Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); //Clear frame buffer of display
display.display(); //Put clear image on display
display.print("Connecting to WiFi...");
display.partialUpdate();
//Connect to the WiFi network.
WiFi.mode(WIFI_MODE_STA);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
display.print(".");
display.partialUpdate();
}
display.println("\nWiFi OK! Downloading...");
display.partialUpdate();
//Use a HTTP get request to fetch the graph from VariPass.
//The API expects a few parameters in the URL to allow it to work.
// action - Should be set to "sgraph" or "graph" in order to generate a compatible image.
// id - ID of the variable. It is enough to specify just the ID if the variable is public,
// but a "key" parameter should also be specified if not.
// width - Width of the generated graph, here set to half the Inkplate's width.
// height - Height of the generated graph, here set to half the Inkplate's height.
// eink - Should be set to true to generate a monochrome 1 bit bitmap better suitable for Inkplate.
// For more detailed explanation and more parameters, please visit the docs page: https://varipass.org/docs/
if(!display.drawBitmapFromWeb("https://api.varipass.org/?action=sgraph&id=kbg3eQfA&width=400&height=300&eink=true", 200, 150)) {
display.println("Image open error");
display.partialUpdate();
}
display.partialUpdate();
WiFi.mode(WIFI_OFF);
}
void loop() {
//Nothing...
}

View File

@ -0,0 +1,52 @@
/*
Inkplate_Battery_Voltage_And_Temperature example for e-radionica Inkplate 6
For this example you will need USB cable, Inkplate 6 and a Lithium battery (3.6V) with two pin JST connector.
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example will show you how to read voltage of the battery and read temperature from on-board
temperature sensor which is part of TPS65186 e-paper PMIC.
NOTE: In order to read temperature, e-paper has to be refreshed at least one time,
or you have to power up epaper PMIC with einkOn() function from Inkplate library.
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
#include "symbols.h" //Include .h file that contains byte array for battery symbol and temperature symbol.
// It is in same folder as this sketch. You can even open it (read it) by clicking on symbols.h tab in Arduino IDE
Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1-bit mode (BW)
void setup()
{
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); // Clear frame buffer of display
display.display(); // Put clear image on display
display.setTextSize(2); // Scale text to be two times bigger then original (5x7 px)
display.setTextColor(BLACK, WHITE); // Set text color to black and background color to white
}
void loop()
{
int temperature;
float voltage;
temperature = display.readTemperature(); // Read temperature from on-board temperature sensor
voltage =
display.readBattery(); // Read battery voltage (NOTE: Doe to ESP32 ADC accuracy, you should calibrate the ADC!)
display.clearDisplay(); // Clear everything in frame buffer of e-paper display
display.drawImage(battSymbol, 100, 100, 106, 45, BLACK); // Draw battery symbol at position X=100 Y=100
display.setCursor(210, 120);
display.print(voltage, 2); // Print battery voltage
display.print('V');
display.drawImage(tempSymbol, 100, 200, 38, 79, BLACK); // Draw temperature symbol at position X=100, Y=200
display.setCursor(150, 225);
display.print(temperature, DEC); // Print temperature
display.print('C');
display.display(); // Send everything to display (refresh the screen)
delay(10000); // Wait 10 seconds before new measurement
}

View File

@ -0,0 +1,56 @@
/*
Inkplate_Low_Power example for e-radionica.com Inkplate 6
For this example you will need USB cable and Inkplate 6.
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example will show you how you can use low power functionality of Inkplate board.
In deep sleep, whole board will consume about 25uA from battery.
Inkplate will wake every 20 seconds change content on screen.
NOTE: Because we are using deep sleep, everytime the board wakes up, it starts program from begining.
Also, whole content from RAM gets erased, so you CAN NOT use partial updates.
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
#include "driver/rtc_io.h" //ESP32 library used for deep sleep and RTC wake up pins
#include "picture1.h" //Include .h files of 3 pictures. All three pictures were converted using LCD Image Converter software
#include "picture2.h"
#include "picture3.h"
const uint8_t *pictures[] = {pic1, pic2, pic3}; // This array of pinters holds address of every picture in the memory,
// so we can easly select it by selecting index in array
#define uS_TO_S_FACTOR 1000000 // Conversion factor for micro seconds to seconds
#define TIME_TO_SLEEP 20 // How long ESP32 will be in deep sleep (in seconds)
RTC_DATA_ATTR int slide = 0;
Inkplate display(INKPLATE_3BIT); // Create an object on Inkplate library and also set library into 3 Bit mode (gray)
void setup()
{
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); // Clear frame buffer of display
display.drawImage(
pictures[slide], 0, 0, 800,
600); // Display selected picture at location X=0, Y=0. All three pictures have resolution of 800x600 pixels
display.display(); // Refresh the screen with new picture
slide++; // Update counter for pictures. With this variable, we choose what picture is going to be displayed on
// screen
if (slide > 2)
slide = 0; // We do not have more than 3 images, so roll back to zero
rtc_gpio_isolate(GPIO_NUM_12); // Isolate/disable GPIO12 on ESP32 (only to reduce power consumption in sleep)
esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR); // Activate wake-up timer -- wake up after 20s here
esp_deep_sleep_start(); // Put ESP32 into deep sleep. Program stops here.
}
void loop()
{
// Nothing! If you use deep sleep, whole program should be in setup() because each time the board restarts, not in a
// loop()! loop() must be empty!
}

View File

@ -0,0 +1,49 @@
/*
Inkplate_MCP23017 example for e-radionica.com Inkplate 6
For this example you will need only a micro USB cable, Inkplate6, 330 Ohm resistor and LED diode.
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
Connect resistor to GPB7 pin on MCP23017 header at bottom right corner on the backside (component side) of Inkplate.
You will have to connect one side of 330 Ohm resistor to GPB7, than other side to anode of LED and finally, cathode
pin of LED to GND.
This example will show you how you can manipulate with I/Os of MCP23017 Expander.
You can only manipulate with Port B of MCP23017 (GPB1-GPB7). Port A is used for epaper panel and TPS65186 PMIC.
GPB0 is used for ESP32 GPIO0 so you can't use it either.
GPB1 is used for enabling battery reading (if Batt solder bridge is bridged between second and third pad)
GPB2, GPB3 and GPB4 are used for reading touchpad (if Touchpad solder bridges are bridged between second pad and
third pad). If every thing is connected ok, after you upload code, LED should blink.
DANGER: DO NOT USE GPA0-GPA7 and GPB0. In code those are pins from 0-8!!! Using those, you might permanently damage
the screen. You should only use pins from 9-15.
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
#define LED_PIN \
15 // We are going to use pin GPB7 (remember! GPA0 = 0, GPA1 = 1, ..., GPA7 = 7, GPB0 = 8, GBP1 = 9, ..., GPB7 =
// 15)
Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1-bit mode (BW)
void setup()
{
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
display.pinModeMCP(
LED_PIN,
OUTPUT); // Set pin 15 (or GPB7) to output. On that pin, we sholud connect LED with current limiting resistor
}
void loop()
{
display.digitalWriteMCP(LED_PIN, LOW); // Set output to low (LED does not light up)
delay(1000); // Wait for one second
display.digitalWriteMCP(LED_PIN, HIGH); // Set output to high (LED lights up)
delay(1000); // Wait for one second
}

View File

@ -0,0 +1,71 @@
/*
Inkplate_SD_TXT example for e-radionica.com Inkplate 6
For this example you will need only a micro USB cable, Inkplate 6 and a SD card
loaded with text.txt file that can be found inside folder of this example.
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
To work with SD card on Inkplate, you will need to add one extra library.
Download and install it from here: https://github.com/e-radionicacom/Inkplate-6-SDFat-Arduino-Library
You can open your own .txt file, but in order to this example works properly it should
not have more than 200 chars and you should name it text.txt
This example will show you how to open .txt files and display the content of that file on Inkplate epaper display.
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
#include "SdFat.h" //Include library for SD card
Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1 Bit mode (BW)
SdFile file; // Create SdFile object used for accessing files on SD card
void setup()
{
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); // Clear frame buffer of display
display.display(); // Put clear image on display
// Init SD card. Display if SD card is init propery or not.
if (display.sdCardInit())
{
display.println("SD Card ok! Reading data...");
display.partialUpdate();
// Try to load text with max lenght of 200 chars.
if (!file.open("/text.txt", O_RDONLY))
{ // If it fails to open, send error message to display, otherwise read the file.
display.println("File open error");
display.display();
}
else
{
display.clearDisplay(); // Clear everything that is stored in frame buffer of epaper
display.setCursor(0, 0); // Set print position at the begining of the screen
char text[201]; // Array where data from SD card is stored (max 200 chars here)
int len = file.fileSize(); // Read how big is file that we are opening
if (len > 200)
len = 200; // If it's more than 200 bytes (200 chars), limit to max 200 bytes
file.read(text, len); // Read data from file and save it in text array
text[len] = 0; // Put null terminating char at the and of data
display.print(text); // Print data/text
display.display(); // Do a full refresh of display
}
}
else
{ // If card init was not successful, display error on screen and stop the program (using infinite loop)
display.println("SD Card error!");
display.partialUpdate();
while (true)
;
}
}
void loop()
{
// Nothing...
}

View File

@ -0,0 +1,93 @@
/*
Inkplate_SD_BMP example for e-radionica Inkplate6
For this example you will need a micro USB cable, Inkplate6 and a SD card loaded with
image1.bmp and image2.bmp file that can be found inside folder of this example.
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
To work with SD card on Inkplate, you will need to add one extra library.
Download and install it from here: https://github.com/e-radionicacom/Inkplate-6-SDFat-Arduino-Library
You can open .bmp, .jpeg or .png files that have color depth of 1 bit (BW bitmap), 4 bit, 8 bit and
24 bit AND have resoluton smaller than 800x600 or otherwise it won't fit on screen.
Format your SD card in standard FAT fileformat.
This example will show you how you can read .bmp and .jpeg files (pictures) from SD card and
display that image on e-paper display.
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
#include "SdFat.h" //Include library for SD card
Inkplate display(INKPLATE_3BIT); // Create an object on Inkplate library and also set library into 1 Bit mode (BW)
SdFile file; // Create SdFile object used for accessing files on SD card
void setup()
{
Serial.begin(115200);
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); // Clear frame buffer of display
display.display(); // Put clear image on display
// Init SD card. Display if SD card is init propery or not.
if (display.sdCardInit())
{
display.println("SD Card OK! Reading image...");
display.partialUpdate();
// If card is properly init, try to load image and display it on e-paper at position X=0, Y=0
// NOTE: Both drawImage methods allow for an optional fifth "invert" parameter. Setting this parameter
// to true will flip all colors on the image, making black white and white black. This may be necessary when
// exporting bitmaps from certain softwares.
if (!display.drawImage("image1.bmp", 0, 0, 1))
{
// If is something failed (wrong filename or wrong bitmap format), write error message on the screen.
// REMEMBER! You can only use Windows Bitmap file with color depth of 1, 4, 8 or 24 bits with no
// compression! You can turn of dithering for somewhat faster image load by changing the last 1 to 0, or
// removing the 1 argument completely
display.println("Image open error");
display.display();
}
display.display();
}
else
{
// If SD card init not success, display error on screen and stop the program (using infinite loop)
display.println("SD Card error!");
display.partialUpdate();
while (true)
;
}
delay(5000);
// Now try to load image using SdFat library class (for more advanced users) and display image on epaper.
if (file.open("image2.bmp", O_RDONLY))
{
display.drawBitmapFromSd(&file, 0, 0);
display.display();
}
display.clearDisplay();
delay(3000);
// Now draw a JPEG
if (!display.drawImage("pyramid.jpg", 100, 0, true, false))
{
// If is something failed (wrong filename or wrong format), write error message on the screen.
// You can turn off dithering for somewhat faster image load by changing the fifth parameter to false, or
// removing the parameter completely
display.println("Image open error");
display.display();
}
display.display();
}
void loop()
{
// Nothing...
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

View File

@ -0,0 +1,85 @@
/*
Inkplate_Touchpads example for e-radionica.com Inkplate 6
For this example you will need only a micro USB cable and Inkplate 6.
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example will show you how you can use built-in touchpads (on PCB marked with numbers 1, 2 and 3).
These are basically touch sensitive switches. You can read state each of these with function readTouchpad()
and the argument you need to pass to this function is PAD1 if you want to read the state of touchpad marked
as "1" on PCB, PAD2 for second touchpad, PAD3 for third. You can also use numbers as arguments.
For that you need to pass number 0 for touchpad that is marked as 1 on PCB, 1 for second touchpad and 2 for third.
Function will return 1 if selected touchpad is pressed, zero if not.
In this example, if you touch first pad, ti will decrese number showed on screen, if you touch thirs touch pad,
it will increase the number, if you touch second touchpad, it will reset number to zero.
NOTE: You can not use touch pads when enclosure is fitted on the Inkplate - they are not that sensitive!
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1 Bit mode (BW)
int number = 0; // Variable that stores our number
int n = 0; // Variable that keeps track on how many times display is partially updated
void setup()
{
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); // Clear frame buffer of display
display.display(); // Put clear image on display
display.setTextSize(5); // Set text scaling to five (text will be five times bigger)
display.setTextColor(BLACK, WHITE); // Set text color to black and background color to white
displayNumber(); // Call our function to display nubmer on screen
}
void loop()
{
if (display.readTouchpad(PAD1))
{ // Check if first pad has been touched. If it is, decrement the number and refresh the screen.
number--;
displayNumber();
}
if (display.readTouchpad(PAD2))
{ // If you touched second touchpad, set number to zero and refresh screen by calling our displayNumber() function
number = 0;
displayNumber();
}
if (display.readTouchpad(PAD3))
{ // If you touched third touchpad, incerement the number and refresh the screen.
number++;
displayNumber();
}
delay(100); // Wait a little bit between readings.
}
// Function that will write you number to screen
void displayNumber()
{
display.clearDisplay(); // First, lets delete everything from frame buffer
display.setCursor(385, 280); // Set print cursor at X=385, Y=280 (roughly in the middle of the screen)
display.print(number, DEC); // Print the number
display.setCursor(255, 560); // Set new print position (right above first touchpad)
display.print('-'); // Print minus sign
display.setCursor(385, 560); // Set new print position (right above second touchpad)
display.print('0'); // Print zero
display.setCursor(520, 560); // Set new print position (right above third touchpad)
display.print('+'); // Print plus sign
if (n > 20)
{ // Chech if screen has been partially refreshed more than 20 times. If it is, do a full refresh. If is not, do a
// partial refresh
display.display();
n = 0;
}
else
{
display.partialUpdate();
n++;
}
}

View File

@ -0,0 +1,103 @@
/*
Inkplate_Wake_up_on_touchpads example for e-radionica.com Inkplate 6
For this example you will need USB cable and an Inkplate 6
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
Here is shown how to use MCP and ESP interrupts to wake up the MCU from deepsleep when touchpad is pressed.
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include <Inkplate.h>
// Conversion factor for micro seconds to seconds
#define uS_TO_S_FACTOR 1000000
// Time ESP32 will go to sleep (in seconds)
#define TIME_TO_SLEEP 30
// Initiate Inkplate object
Inkplate display(INKPLATE_1BIT);
byte touchPadPin = 10;
// Store int in rtc data, to remain persistent during deep sleep
RTC_DATA_ATTR int bootCount = 0;
void setup()
{
Serial.begin(115200);
display.begin();
// Setup mcp interrupts
display.pinModeMCP(touchPadPin, INPUT);
display.setIntOutput(1, true, true, HIGH);
display.setIntPin(touchPadPin, RISING);
++bootCount;
// Our function declared below
displayInfo();
// Go to sleep for TIME_TO_SLEEP seconds, but also enable wake up from gpio 34
// Gpio 34 is where the mcp interrupt is connected, check
// https://github.com/e-radionicacom/Inkplate-6-hardware/blob/master/Schematics%2C%20Gerber%2C%20BOM/Inkplate6%20Schematics.pdf
// for more detail
esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);
esp_sleep_enable_ext0_wakeup(GPIO_NUM_34, 1);
// Go to sleep
esp_deep_sleep_start();
}
void loop()
{
// Never here
}
// Function that will write number of boots and boot reason to screen
void displayInfo()
{
// First, lets delete everything from frame buffer
display.clearDisplay();
// Set text cursor and size
display.setCursor(10, 280);
display.setTextSize(2);
display.print(F("Boot count: "));
display.println(bootCount, DEC); // Print the number
// Set next line cursor position
display.setCursor(10, 320);
// Display wake up reason
esp_sleep_wakeup_cause_t wakeup_reason;
wakeup_reason = esp_sleep_get_wakeup_cause();
switch (wakeup_reason)
{
case ESP_SLEEP_WAKEUP_EXT0:
display.println("Wakeup caused by external signal using RTC_IO");
break;
case ESP_SLEEP_WAKEUP_EXT1:
display.println("Wakeup caused by external signal using RTC_CNTL");
break;
case ESP_SLEEP_WAKEUP_TIMER:
display.println("Wakeup caused by timer");
break;
case ESP_SLEEP_WAKEUP_TOUCHPAD:
display.println("Wakeup caused by touchpad");
break;
case ESP_SLEEP_WAKEUP_ULP:
display.println("Wakeup caused by ULP program");
break;
default:
display.println("Wakeup was not caused by deep sleep");
break;
}
display.display();
}

View File

@ -0,0 +1,125 @@
/*
Web_BMP_pictures example for e-radionica Inkplate6
For this example you will need a micro USB cable, Inkplate6, and an available WiFi connection.
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
You can open .bmp files that have color depth of 1 bit (BW bitmap), 4 bit, 8 bit and
24 bit AND have resoluton smaller than 800x600 or otherwise it won't fit on screen.
This example will show you how you can download a .bmp file (picture) from the web and
display that image on e-paper display.
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
23 July 2020 by e-radionica.com
*/
#include "HTTPClient.h" //Include library for HTTPClient
#include "Inkplate.h" //Include Inkplate library to the sketch
#include "WiFi.h" //Include library for WiFi
Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1 Bit mode (BW)
const char *ssid = ""; // Your WiFi SSID
const char *password = ""; // Your WiFi password
void setup()
{
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); // Clear frame buffer of display
display.display(); // Put clear image on display
display.print("Connecting to WiFi...");
display.partialUpdate();
// Connect to the WiFi network.
WiFi.mode(WIFI_MODE_STA);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
display.print(".");
display.partialUpdate();
}
display.println("\nWiFi OK! Downloading...");
display.partialUpdate();
// Draw the first image from web.
// Monochromatic bitmap with 1 bit depth. Images like this load quickest.
// NOTE: Both drawImage methods allow for an optional fifth "invert" parameter. Setting this parameter to true
// will flip all colors on the image, making black white and white black. This may be necessary when exporting
// bitmaps from certain softwares. Forth parameter will dither the image. Photo taken by: Roberto Fernandez
if (!display.drawImage("https://varipass.org/neowise_mono.bmp", 0, 0, false, true))
{
// If is something failed (wrong filename or wrong bitmap format), write error message on the screen.
// REMEMBER! You can only use Windows Bitmap file with color depth of 1, 4, 8 or 24 bits with no compression!
display.println("Image open error");
display.display();
}
display.display();
// Draw the second image from web, this time using a HTTPClient to fetch the response manually.
// Full color 24 bit images are large and take a long time to load, will take around 20 secs.
HTTPClient http;
// Set parameters to speed up the download process.
http.getStream().setNoDelay(true);
http.getStream().setTimeout(1);
// Photo taken by: Roberto Fernandez
http.begin("https://varipass.org/neowise.bmp");
// Check response code.
int httpCode = http.GET();
if (httpCode == 200)
{
// Get the response length and make sure it is not 0.
int32_t len = http.getSize();
if (len > 0)
{
if (!display.drawBitmapFromWeb(http.getStreamPtr(), 0, 0, len))
{
// If is something failed (wrong filename or wrong bitmap format), write error message on the screen.
// REMEMBER! You can only use Windows Bitmap file with color depth of 1, 4, 8 or 24 bits with no
// compression!
display.println("Image open error");
display.display();
}
display.display();
}
else
{
display.println("Invalid response length");
display.display();
}
}
else
{
display.println("HTTP error");
display.display();
}
display.clearDisplay();
delay(3000);
// Try to load image and display it on e-paper at position X=0, Y=100
// NOTE: Both drawJpegFromWeb methods allow for an optional fifth "invert" parameter. Setting this parameter to
// true will flip all colors on the image, making black white and white black. forth parameter will dither the
// image.
if (!display.drawImage("https://varipass.org/destination.jpg", 0, 100, true, false))
{
// If is something failed (wrong filename or format), write error message on the screen.
display.println("Image open error");
display.display();
}
display.display();
http.end();
WiFi.mode(WIFI_OFF);
}
void loop()
{
// Nothing...
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

View File

@ -0,0 +1,102 @@
/*
Inkplate_Web_Server example for e-radionica.com Inkplate 6
For this example you will need a micro USB cable, Inkplate 6 and a device with WiFi and Internet brower (PC, Laptop,
Smartphone, ...). Select "Inkplate 6(ESP32)" from Tools -> Board menu. Don't have "Inkplate 6(ESP32)" option? Follow
our tutorial and add it: https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example will show you how you can use Inkplate as a small and simple standlone Web Server.
You need to connect to Inkplate with WiFi and open IP address shown on Inkplate display.
After opening IP address, you will se text box where you can type some text and after that you press "Send to
display". Text will apper on Inkplate display! This is just simple example what you can do with it and of course, you
can create much more complex stuff.
HINT: You can change WiFi name and password of your Inkplate WIFi Access point by changing ssid and pass in #define
macros!
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
#include "htmlCode.h" //Include .h file where we stored out html code of our web page
#include <WebServer.h> //Include ESP32 library for Web server
#include <WiFi.h> //Include ESP32 WiFi library
#include <WiFiClient.h> //Include ESP32 WiFi library for AP
#define ssid "Inkplate6"
#define pass "e-radionica"
Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1 Bit mode (BW)
WebServer server(80); // Create Web server on port 80 (HTTP port number)
IPAddress serverIP;
String txt;
void setup()
{
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); // Clear frame buffer of display
display.display(); // Put clear image on display
display.setTextSize(3); // Scale text to be two times bigger then original (5x7 px)
display.setTextColor(BLACK, WHITE); // Set text color to black and background color to white
display.setTextWrap(true); // If text does not fit on screen, send it to new line
WiFi.begin(); // Init. WiFi library
WiFi.mode(WIFI_AP); // Set WiFi to Access point mode
WiFi.softAP(ssid, pass); // Set SSID (WiFi name) and password for Access point
serverIP = WiFi.softAPIP(); // Get the server IP address
server.on("/", handleRoot); // If you open homepage, go to handle root function
server.on("/string/{}",
handleString); // If you send some text to Inkplate, go to handleString function. Note that {} brackets at
// the end of address. That means that web address has some arguments (our text!).
server.begin(); // Start the web server
updatePaper();
}
void loop()
{
server.handleClient(); // You have to constantly read if there is any new client connected to web server
}
void updateHTML()
{ // This function will send response to client and send HTML code of our web page
server.send(200, "text/html", s);
}
void handleRoot()
{ // This function will send response to client if client open a root (homepage) of our web page
updateHTML();
}
void handleString()
{ // This function will send response to client, send HTML code of web page, get the text from argument sent in web page
// address and refresh screen with new text
txt = server.arg(0);
updateHTML();
updatePaper();
}
void updatePaper()
{ // This function updates screen with new data (text)
display.clearDisplay(); // Clear everything from epaper frame buffer
display.setCursor(20, 40); // Print out instruction on how to connect to Inkplate WiFi and how to open a web page
display.print("Connect to ");
display.print(ssid);
display.println(" WiFi with pass: ");
display.setCursor(240, 100);
display.println(pass);
display.setCursor(100, 150);
display.print("Open Your web browser and open");
display.setCursor(240, 210);
display.print("http://");
display.print(serverIP);
display.println('/');
display.println();
display.fillRect(10, 240, 780, 4, BLACK);
display.println("User text:"); // Print out what user typed in web page
display.print(txt);
display.display(); // Send everything to screen (refresh the screen)
}

View File

@ -0,0 +1,95 @@
/*
Inkplate_WiFi_HTTP example for e-radionica.com Inkplate 6
For this example you will need USB cable, Inkplate 6 and stable WiFi Internet connection
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example will show you how to connect to WiFi network, get data from Internet and display that data on epaper.
This example is NOT on to how to parse HTML data from Internet - it will just print HTML on the screen.
In quotation marks you will need write your WiFi SSID and WiFi password in order to connect to your WiFi network.
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
#include <HTTPClient.h> //Include HTTP library to this sketch
#include <WiFi.h> //Include ESP32 WiFi library to our sketch
#define ssid "" // Name of the WiFi network (SSID) that you want to connect Inkplate to
#define pass "" // Password of that WiFi network
Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1 Bit mode (BW)
void setup()
{
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); // Clear frame buffer of display
display.display(); // Put clear image on display
display.setTextSize(2); // Set text scaling to two (text will be two times bigger)
display.setCursor(0, 0); // Set print position
display.setTextColor(BLACK, WHITE); // Set text color to black and background color to white
display.println("Scanning for WiFi networks..."); // Write text
display.display(); // Send everything to display (refresh display)
int n = WiFi.scanNetworks(); // Start searching WiFi networks and put the nubmer of found WiFi networks in variable
// n
if (n == 0)
{ // If you did not find any network, show the message and stop the program.
display.print("No WiFi networks found!");
display.partialUpdate();
while (true)
;
}
else
{
if (n > 10)
n = 0; // If you did find, print name (SSID), encryption and signal strength of first 10 networks
for (int i = 0; i < n; i++)
{
display.print(WiFi.SSID(i));
display.print((WiFi.encryptionType(i) == WIFI_AUTH_OPEN) ? 'O' : '*');
display.print('\n');
display.print(WiFi.RSSI(i), DEC);
}
display.partialUpdate(); //(Partial) refresh thescreen
}
display.clearDisplay(); // Clear everything in frame buffer
display.setCursor(0, 0); // Set print cursor to new position
display.print("Connecting to "); // Print the name of WiFi network
display.print(ssid);
WiFi.begin(ssid, pass); // Try to connect to WiFi network
while (WiFi.status() != WL_CONNECTED)
{
delay(1000); // While it is connecting to network, display dot every second, just to know that Inkplate is
// alive.
display.print('.');
display.partialUpdate();
}
display.print("connected"); // If it's connected, notify user
display.partialUpdate();
HTTPClient http;
if (http.begin("http://example.com/index.html"))
{ // Now try to connect to some web page (in this example www.example.com. And yes, this is a valid Web page :))
if (http.GET() > 0)
{ // If connection was successful, try to read content of the Web page and display it on screen
String htmlText;
htmlText = http.getString();
display.setTextSize(1); // Set smaller text size, so everything can fit on screen
display.clearDisplay();
display.setCursor(0, 0);
display.print(htmlText);
display.display();
}
}
}
void loop()
{
// Nothing
}

View File

@ -0,0 +1,97 @@
/*
Inkplate_easyC example for e-radionica.com Inkplate 6
For this example you will need a micro USB cable, Inkplate 6,
BME680 sensor with easyC connector on it: https://e-radionica.com/en/bme680-breakout-made-by-e-radionica.html
and a easyC cable: https://e-radionica.com/en/easyc-cable-20cm.html
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example will show you how you can read temperature, humidity, air pressure and gas data from BME680.
In order to compile this example successfuly, you will also need to download and install
Adafruit BME680 library: https://github.com/adafruit/Adafruit_BME680
and Adafruit Sensor library ( https://github.com/adafruit/Adafruit_Sensor ).
If you don't know how to install library you can read our tutorial https://e-radionica.com/en/blog/arduino-library/
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Adafruit_BME680.h" //Adafruit library for BME680 Sensor
#include "Inkplate.h" //Include Inkplate library to the sketch
#include <Adafruit_Sensor.h> //Adafruit library for sensors
Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1 Bit mode (BW)
Adafruit_BME680
bme; // Create an object on Adafruit BME680 library
//(with no arguments sent to constructor, that means we are using I2C communication for BME680 sensor)
int n = 0; // Variable that keep track on how many times screen has been partially updated
void setup()
{
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); // Clear frame buffer of display
display.display(); // Put clear image on display
display.setTextSize(2); // Set text scaling to two (text will be two times bigger than normal)
if (!bme.begin(0x76))
{ // Init. BME680 library. e-radionica.com BME680 sensor board uses 0x76 I2C address for sensor
display.println("Sensor init failed!");
display.println("Check sensor wiring/connection!");
display.partialUpdate();
while (1)
;
}
// Set up oversampling and filter initialization for the sensor
bme.setTemperatureOversampling(BME680_OS_8X);
bme.setHumidityOversampling(BME680_OS_2X);
bme.setPressureOversampling(BME680_OS_4X);
bme.setIIRFilterSize(BME680_FILTER_SIZE_3);
bme.setGasHeater(320, 150); // 320*C for 150 ms
}
void loop()
{
if (!bme.performReading())
{ // If sending command to start reading data fails, send error message to display
display.clearDisplay();
display.setCursor(0, 0);
display.print("Failed to read data from sensor");
display.partialUpdate();
}
else
{ // Otherwise, clear frame buffer of epaper display
display.clearDisplay(); // Print out new data
display.setCursor(0, 0);
display.print("Air temperature: ");
display.print(bme.temperature);
display.println(" *C");
display.print("Air pressure: ");
display.print(bme.pressure / 100.0);
display.println(" hPa");
display.print("Air humidity: ");
display.print(bme.humidity);
display.println(" %");
display.print("Gas sensor resistance: ");
display.print(bme.gas_resistance / 1000.0);
display.println(" kOhms");
if (n > 20)
{ // If display has been partially updated more than 20 times, do a full refresh, otherwise, perform a partial
// update.
display.display();
n = 0;
}
else
{
display.partialUpdate();
n++;
}
}
delay(2000); // Wait a little bit between readings
}

View File

@ -0,0 +1,58 @@
/*
Basic_custom_font example for e-radionica.com Inkplate 6
For this example you will need only USB cable and Inkplate 6
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example will show you how to use custom fonts on Inkplate 6 thanks to Adafruit GFX
More on custom fonts in Adafruit GFX: https://learn.adafruit.com/adafruit-gfx-graphics-library/using-fonts
In this example, we will use already prebuilt .h font file.
If you want use your own fonts, you first need to convert it from .ttf to .h using online converter:
https://rop.nl/truetype2gfx/ When you convert it, download .h file and put it inside sketch folder. Include that file
using #include macro and set font using setFont() function. NOTE: When using custom fonts, you can't use background
color. Also, start position of text is not in top left corner!
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
#include "DSEG14Classic_Regular20pt7b.h" //Include second font
#include "Not_Just_Groovy20pt7b.h" //Include first .h font file to the sketch
Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1-bit mode (BW)
void setup()
{
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); // Clear frame buffer of display
display.display(); // Put clear image on display
display.setFont(&Not_Just_Groovy20pt7b); // Select new font
display.setTextSize(2); // Set font scaling to two (font will be 2 times bigger)
display.setCursor(0, 60); // Set print cursor on X = 0, Y = 60
display.println("Inkplate 6"); // Print some text
display.setTextSize(1); // Set font scaling to one (font is now original size)
display.print("by e-radionica.com"); // Print text
display.setFont(&DSEG14Classic_Regular20pt7b); // Select second font
display.setCursor(0, 250); // Set print position on X = 0, Y = 250
display.println("Some old-school 14 segment"); // Print text
display.println("display font on e-paper");
display.print("display");
display.setFont(); // Use original 5x7 pixel fonts
display.setCursor(0, 550); // Set new print position at X = 0, Y = 550
display.setTextSize(3); // Set font scaling to three (font will be 3 times bigger)
display.print("Classic 5x7 px fonts"); // Print text
display.display(); // Display everything on display
}
void loop()
{
// Nothing...
}

View File

@ -0,0 +1,58 @@
/*
Basic_partial_update example for e-radionica Inkplate 6
For this example you will need only USB cable and Inkplate 6
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
In this example we will show how to use partial update functionality of Inkplate 6 e-paper display.
It will scroll text that is saved in char array
NOTE: Partial update is only available on 1 Bit mode (BW) and it is not recommended to use it on first refresh after
power up. It is recommended to do a full refresh every 5-10 partial refresh to maintain good picture quality.
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1-bit mode (BW)
// Char array where you can store your text that will be scrolled.
const char text[] = "This is partial update on Inkplate 6 e-paper display! :)";
// This variable is used for moving the text (scrolling)
int offset = 800;
// Variable that keeps count on how much screen has been partially updated
int n = 0;
void setup()
{
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); // Clear frame buffer of display
display.display(); // Put clear image on display
display.setTextColor(BLACK, WHITE); // Set text color to be black and background color to be white
display.setTextSize(4); // Set text to be 4 times bigger than classic 5x7 px text
display.setTextWrap(false); // Disable text wraping
}
void loop()
{
display.clearDisplay(); // Clear content in frame buffer
display.setCursor(offset, 300); // Set new position for text
display.print(text); // Write text at new position
if (n > 9)
{ // Check if you need to do full refresh or you can do partial update
display.display(); // Do a full refresh
n = 0;
}
else
{
display.partialUpdate(); // Do partial update
n++; // Keep track on how many times screen has been partially updated
}
offset -= 20; // Move text into new position
if (offset < 0)
offset = 800; // Text is scrolled till the end of the screen? Get it back on the start!
delay(500); // Delay between refreshes.
}

View File

@ -0,0 +1,734 @@
/*
Basic_monochorme example for e-radionica.com Inkplate 6
For this example you will need only USB cable and Inkplate 6.
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example will show you how you can draw some simple graphics using
Adafruit GFX functions. Yes, Inkplate library is 100% compatible with GFX lib!
Learn more about Adafruit GFX: https://learn.adafruit.com/adafruit-gfx-graphics-library )
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
Inkplate display(INKPLATE_1BIT); // Create object on Inkplate library and set library to work in monochorme mode
// Other option is gray mode, which is demonstrated in next example "Inkplate_basic_gray"
#define DELAY_MS \
5000 // Delay in milliseconds between screen refresh. Refreshing e-paper screens more often than 5s is not
// recommended
// Want to refresh faster? Use partial update! Find example in "3-Inkplate-basic_partial_update"
// Array that holds data for bitmap image of 576x100 pixels. You can convert your own image using LCD image Converter.
const uint8_t logo[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xf8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff,
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0f, 0xff, 0xff, 0x00, 0x00, 0x3f, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xf8, 0x00,
0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff,
0xf0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xc0, 0x00, 0x00, 0x00,
0x00, 0x01, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x1f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf8, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x07, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x07, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xfc,
0x00, 0x00, 0x7f, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x07, 0xff, 0xff,
0xff, 0xfc, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc3, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00,
0x0f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x07, 0xc3, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x07, 0xfc, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x07, 0xc3, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x1f, 0xf0, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x03, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc3, 0xf0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x01,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x03, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc3, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x03, 0xff, 0xfc, 0x00, 0x7d,
0xff, 0xff, 0x80, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc3, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x07, 0xfe, 0x30, 0x00, 0x30, 0xff, 0xff, 0x80, 0x01,
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x0f, 0xfc, 0x30, 0x00, 0x30, 0xff, 0xff, 0x80, 0x01, 0xff, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x7f, 0xc0, 0x1f, 0xf0, 0x38, 0x70, 0x20, 0xfe, 0x1f, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x1f, 0xe0,
0x3f, 0xf8, 0x78, 0xfc, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1f, 0xff, 0x80, 0x01, 0xff, 0xfc, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xc1, 0xc0, 0x00, 0xff, 0xfe, 0x00, 0x0f, 0xff,
0xfe, 0x00, 0x00, 0xe0, 0x00, 0x7f, 0xff, 0x00, 0x00, 0x07, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80, 0x3f, 0xc0, 0x3f, 0xf8, 0xf8, 0xfc,
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xc0, 0x1f,
0xff, 0xff, 0xc0, 0x01, 0xff, 0xff, 0xff, 0xc3, 0xe0, 0x0f, 0xff, 0xff, 0xe0, 0x1f, 0xff, 0xff, 0xf0, 0x00, 0xf0,
0x07, 0xff, 0xff, 0xf0, 0x00, 0x7f, 0xff, 0xff, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xfe, 0x00, 0x07, 0xff, 0xff, 0xe0,
0x0f, 0xff, 0xff, 0x07, 0xff, 0xfc, 0x00, 0xff, 0x80, 0x3f, 0x80, 0x3f, 0xf8, 0xf8, 0xfc, 0x00, 0x00, 0x00, 0xff,
0x80, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xc0, 0x3f, 0xff, 0xff, 0xe0, 0x03,
0xff, 0xff, 0xff, 0xc3, 0xf0, 0x1f, 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xfc, 0x01, 0xf0, 0x0f, 0xff, 0xff, 0xf8,
0x00, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0xf0, 0x0f, 0xff, 0xff, 0x8f,
0xff, 0xff, 0x00, 0xff, 0x00, 0x7f, 0x00, 0x00, 0xf0, 0x78, 0xfc, 0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x3f,
0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xc0, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0xff, 0xff, 0xff, 0xc3,
0xf0, 0x3f, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xfe, 0x01, 0xf0, 0x3f, 0xff, 0xff, 0xfc, 0x03, 0xff, 0xff, 0xff,
0xc0, 0x00, 0x03, 0xff, 0xff, 0xff, 0xc0, 0x1f, 0xff, 0xff, 0xfc, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xff,
0x00, 0xff, 0x00, 0x00, 0x00, 0x30, 0xfc, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xfe, 0x00,
0x00, 0x00, 0x3f, 0xff, 0xff, 0xc0, 0xff, 0xff, 0xff, 0xf8, 0x0f, 0xff, 0xff, 0xff, 0xc3, 0xf0, 0x7f, 0xff, 0xff,
0xfc, 0x1f, 0xff, 0xff, 0xff, 0x01, 0xf0, 0x3f, 0xff, 0xff, 0xfe, 0x03, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x03, 0xff,
0xff, 0xff, 0xc0, 0x3f, 0xff, 0xff, 0xfc, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xff, 0x00, 0xfe, 0x00, 0x00,
0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00, 0x7f, 0x80, 0x01, 0xff, 0x00, 0x00, 0x00, 0x7f, 0xe0,
0x00, 0x01, 0xfe, 0x00, 0x07, 0xf8, 0x1f, 0xe0, 0x00, 0x0f, 0xc3, 0xf0, 0xff, 0x00, 0x03, 0xfc, 0x1f, 0x80, 0x01,
0xff, 0x81, 0xf0, 0x7f, 0x80, 0x01, 0xff, 0x07, 0xf8, 0x00, 0x1f, 0xf0, 0x00, 0x03, 0xf0, 0x00, 0x0f, 0xe0, 0x3f,
0x00, 0x00, 0xfe, 0x0f, 0xc0, 0x07, 0xff, 0x00, 0x1f, 0xf0, 0xff, 0x80, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00,
0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x01, 0xfc, 0x00,
0x01, 0xfc, 0x1f, 0xc0, 0x00, 0x07, 0xc3, 0xf0, 0xfe, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x7f, 0xc1, 0xf0, 0x7f,
0x00, 0x00, 0x7f, 0x07, 0xf0, 0x00, 0x07, 0xf0, 0x00, 0x07, 0xe0, 0x00, 0x07, 0xf0, 0x7e, 0x00, 0x00, 0x7f, 0x0f,
0x80, 0x03, 0xff, 0x00, 0x07, 0xf0, 0xff, 0xfc, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x7f, 0xc0,
0x00, 0x00, 0xfc, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0xfc, 0x3f, 0x00,
0x00, 0x07, 0xc3, 0xf0, 0xfc, 0x00, 0x00, 0x7e, 0x1f, 0x00, 0x00, 0x1f, 0xc1, 0xf0, 0xfe, 0x00, 0x00, 0x3f, 0x0f,
0xe0, 0x00, 0x03, 0xf0, 0x00, 0x07, 0xc0, 0x00, 0x03, 0xf0, 0x7c, 0x00, 0x00, 0x3f, 0x0f, 0x80, 0x00, 0xff, 0x00,
0x03, 0xf0, 0xff, 0xff, 0xfd, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 0xfc, 0x00,
0x00, 0x3f, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1,
0xf8, 0x00, 0x00, 0x3e, 0x1f, 0x00, 0x00, 0x0f, 0xc1, 0xf0, 0xfc, 0x00, 0x00, 0x1f, 0x0f, 0xc0, 0x00, 0x01, 0xf0,
0x00, 0x0f, 0xc0, 0x00, 0x01, 0xf0, 0xfc, 0x00, 0x00, 0x1f, 0x0f, 0x80, 0x00, 0x7f, 0x00, 0x01, 0xf8, 0xff, 0xff,
0xff, 0xff, 0x01, 0xc0, 0x00, 0xff, 0xfc, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x1f, 0x00, 0x00,
0x01, 0xf8, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x7c, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f,
0x1f, 0x00, 0x00, 0x07, 0xe1, 0xf0, 0xfc, 0x00, 0x00, 0x1f, 0x0f, 0xc0, 0x00, 0x01, 0xf0, 0x00, 0x0f, 0x80, 0x00,
0x01, 0xf0, 0xf8, 0x00, 0x00, 0x1f, 0x0f, 0x80, 0x00, 0x3f, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x83, 0xe0,
0x00, 0xff, 0xfc, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00,
0x03, 0xe0, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03,
0xe1, 0xf0, 0xfc, 0x00, 0x00, 0x0f, 0x0f, 0xc0, 0x00, 0x03, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xf0, 0xf8, 0x00,
0x00, 0x0f, 0x0f, 0x80, 0x00, 0x3f, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0xff, 0xfc, 0x00,
0x00, 0x3f, 0xc0, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f,
0xfc, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xe1, 0xf0, 0xfc, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80,
0x00, 0x3f, 0x00, 0x00, 0x7e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0xff, 0xfc, 0x00, 0x00, 0x3f, 0xc0, 0x00,
0x00, 0xf8, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x3f, 0x00, 0x00,
0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0xff, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00, 0x3f, 0x00, 0x00,
0x7e, 0x3f, 0xfd, 0xfd, 0xfe, 0x03, 0xc0, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 0xf8, 0x00, 0x0f,
0xff, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xfc, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0,
0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x00,
0x0f, 0x80, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f, 0x3f, 0xfc, 0xfc,
0xfc, 0x00, 0x80, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 0xf8, 0x00, 0x7f, 0xfe, 0x00, 0x00, 0x03,
0xf0, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xfc, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f,
0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00,
0x00, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00,
0xfc, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00, 0xf8, 0x1f, 0xff, 0xfc, 0x07, 0xff, 0xc3, 0xf0, 0x00, 0x00, 0x00,
0x3f, 0xff, 0xff, 0xfc, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1,
0xf0, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00,
0x0f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00,
0x7f, 0xc0, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xfc, 0x0f, 0xff, 0xc3, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfc, 0x7c,
0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00,
0x00, 0x01, 0xff, 0xff, 0xf1, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00,
0x1f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0xff, 0x00, 0x70, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00,
0xff, 0xff, 0xff, 0xc0, 0x0f, 0xff, 0xc3, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x7c, 0x3f, 0x00, 0x00, 0x07,
0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x00, 0x03, 0xff, 0xfc,
0x00, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f,
0x00, 0x00, 0x7f, 0x00, 0xf8, 0x02, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x00, 0xff, 0xff, 0xfe, 0x00,
0x0f, 0xff, 0xc3, 0xf0, 0x00, 0x00, 0x01, 0xff, 0xf8, 0x00, 0x7c, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00,
0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x00, 0x07, 0xff, 0xe0, 0x00, 0xf0, 0x00, 0x0f,
0x80, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x3f, 0x80,
0xf8, 0x0f, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0xff, 0xff, 0xc0, 0x00, 0x07, 0xff, 0xc3, 0xf0,
0x00, 0x00, 0x03, 0xff, 0x00, 0x00, 0x7c, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00,
0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x00, 0x07, 0xfc, 0x00, 0x00, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00,
0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x3f, 0xc0, 0xf8, 0x0f, 0x80, 0xfc,
0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x03, 0xf8,
0x00, 0x00, 0x7c, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0,
0xfc, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x0f,
0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x1f, 0xe0, 0xf0, 0x0f, 0x80, 0xfc, 0x00, 0x00, 0x00, 0xff,
0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x0f, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x7c, 0x3f,
0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x0f,
0x0f, 0xc0, 0x00, 0x00, 0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe0, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00, 0x1f,
0x00, 0x00, 0x3f, 0x00, 0x00, 0x1f, 0xf0, 0x60, 0x0f, 0x80, 0xfc, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xfc,
0x00, 0x00, 0x1f, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 0x7c, 0x3f, 0x00, 0x00, 0x07, 0xc3,
0xf1, 0xf0, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x0f, 0x0f, 0xc0, 0x00, 0x01,
0xf0, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xf0, 0xf8, 0x00, 0x00, 0x0f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f, 0x00,
0x00, 0x0f, 0xfc, 0x20, 0x06, 0x00, 0xff, 0xff, 0x80, 0x00, 0xff, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x3f, 0x00,
0x00, 0x03, 0xf0, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x7c, 0x3f, 0x00, 0x00, 0x07, 0xc3, 0xf1, 0xf0, 0x00, 0x00,
0x3f, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x1f, 0x0f, 0xc0, 0x00, 0x01, 0xf0, 0x00, 0x0f, 0x80,
0x00, 0x01, 0xf0, 0xf8, 0x00, 0x00, 0x1f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x07, 0xfe, 0x70,
0x0e, 0x00, 0xff, 0xff, 0x80, 0x00, 0xff, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x03, 0xf0, 0x00,
0x00, 0x03, 0xf0, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x0f, 0xc3, 0xf0, 0xf8, 0x00, 0x00, 0x3e, 0x1f, 0x00, 0x00,
0x03, 0xf1, 0xf0, 0xfc, 0x00, 0x00, 0x1f, 0x0f, 0xc0, 0x00, 0x01, 0xf0, 0x00, 0x0f, 0xc0, 0x00, 0x01, 0xf0, 0xfc,
0x00, 0x00, 0x1f, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f, 0x07, 0x80, 0x03, 0xff, 0xf8, 0x3e, 0x01, 0xff, 0xff,
0x80, 0x01, 0xff, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x03, 0xf8, 0x00,
0x00, 0xfc, 0x3f, 0x80, 0x00, 0x0f, 0xc3, 0xf0, 0xfc, 0x00, 0x00, 0x7e, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0x7e,
0x00, 0x00, 0x3f, 0x0f, 0xe0, 0x00, 0x03, 0xf0, 0x00, 0x07, 0xc0, 0x00, 0x03, 0xf0, 0x7c, 0x00, 0x00, 0x3f, 0x0f,
0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f, 0x0f, 0xc0, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x03, 0xff, 0x00,
0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x03, 0xfc, 0x00, 0x01, 0xfc, 0x1f, 0xc0,
0x00, 0x1f, 0xc3, 0xf0, 0xfe, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0x7f, 0x00, 0x00, 0x7f, 0x07,
0xf0, 0x00, 0x07, 0xf0, 0x0e, 0x07, 0xe0, 0x00, 0x07, 0xe0, 0x7e, 0x00, 0x00, 0x7e, 0x0f, 0x80, 0x00, 0x1f, 0x00,
0x00, 0x3f, 0x0f, 0xe0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0x00, 0x03, 0xfe, 0x00, 0x00, 0x00, 0x7f, 0xff,
0xff, 0xfe, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0x83, 0xf0,
0xff, 0xff, 0xff, 0xfc, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0x3f, 0xff, 0xff, 0xfe, 0x07, 0xff, 0xff, 0xff, 0xe0,
0x1f, 0x03, 0xff, 0xff, 0xff, 0xe0, 0x3f, 0xff, 0xff, 0xfe, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f, 0x1f, 0xf0,
0x00, 0x7f, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x03, 0xfe, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xfc, 0x00, 0x00,
0x03, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0xff, 0xff, 0xff, 0x83, 0xf0, 0x7f, 0xff, 0xff, 0xfc,
0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0x3f, 0xff, 0xff, 0xfe, 0x03, 0xff, 0xff, 0xff, 0xe0, 0x3f, 0x03, 0xff, 0xff,
0xff, 0xc0, 0x3f, 0xff, 0xff, 0xfc, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f, 0x1f, 0xf0, 0x00, 0x1f, 0xff, 0xff,
0xff, 0xfc, 0x00, 0x00, 0x03, 0xfc, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00,
0x00, 0xff, 0xff, 0xff, 0xf0, 0x07, 0xff, 0xff, 0xff, 0x03, 0xf0, 0x3f, 0xff, 0xff, 0xf8, 0x1f, 0x00, 0x00, 0x03,
0xf1, 0xf0, 0x1f, 0xff, 0xff, 0xfc, 0x01, 0xff, 0xff, 0xff, 0xc0, 0x3f, 0x01, 0xff, 0xff, 0xff, 0x80, 0x1f, 0xff,
0xff, 0xf8, 0x0f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x3f, 0x0f, 0xf0, 0x00, 0x07, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00,
0x07, 0xfc, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff,
0xe0, 0x03, 0xff, 0xff, 0xfe, 0x03, 0xf0, 0x1f, 0xff, 0xff, 0xf0, 0x1f, 0x00, 0x00, 0x03, 0xf1, 0xf0, 0x0f, 0xff,
0xff, 0xf8, 0x00, 0xff, 0xff, 0xff, 0x80, 0x3f, 0x00, 0xff, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0xf0, 0x0f, 0x80,
0x00, 0x1f, 0x00, 0x00, 0x3f, 0x0f, 0xf8, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00,
0x00, 0x03, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff,
0xf0, 0x03, 0xe0, 0x07, 0xff, 0xff, 0xc0, 0x0f, 0x00, 0x00, 0x03, 0xe0, 0xf0, 0x03, 0xff, 0xff, 0xe0, 0x00, 0x3f,
0xff, 0xfe, 0x00, 0x0e, 0x00, 0x1f, 0xff, 0xf8, 0x00, 0x01, 0xff, 0xff, 0x80, 0x07, 0x00, 0x00, 0x0e, 0x00, 0x00,
0x3c, 0x0f, 0xfc, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfe,
0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x01, 0xff, 0xfc, 0x00, 0x00, 0x1f, 0xff, 0xc0, 0x00, 0xc0, 0x00,
0xff, 0xfe, 0x00, 0x06, 0x00, 0x00, 0x00, 0xc0, 0x60, 0x00, 0x7f, 0xff, 0x00, 0x00, 0x07, 0xff, 0xf0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfc, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f,
0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xe0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x03, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x7f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x03, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x00, 0x00,
0x00, 0x00, 0x1f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00, 0x03, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0x00, 0x00, 0x3f, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
0xff, 0xff, 0xe0, 0x03, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
void setup()
{
display.begin(); // Init library (you should call this function ONLY ONCE)
display.clearDisplay(); // Clear any data that may have been in (software) frame buffer.
//(NOTE! This does not clean image on screen, it only clears it in the frame buffer inside ESP32).
display.clean(); // Clear everything that has previously been on a screen
display.setCursor(150, 320);
display.setTextSize(4);
display.print("Welcome to Inkplate 6!");
display.display(); // Write hello message
delay(5000); // Wait a little bit
}
void loop()
{
// Example will demostrate funcionality one by one. You always first set everything in the frame buffer and
// afterwards you show it on the screen using display.display().
// Let's start by drawing a pixel at x = 100 and y = 50 location
display.clearDisplay(); // Clear everytning that is inside frame buffer in ESP32
displayCurrentAction(
"Drawing a pixel"); // Function which writes small text at bottom left indicating what's currently done
// NOTE: you do not need displayCurrentAction function to use Inkplate!
display.drawPixel(100, 50, BLACK); // Draw one black pixel at X = 100, Y = 50 position in BLACK color (must be black
// since Inkplate is in BW mode)
display.display(); // Send image to display. You need to call this one each time you want to transfer frame buffer
// to the screen.
delay(DELAY_MS); // Wait a little bit
// Now, let's draw some random pixels!
display.clearDisplay(); // Clear everything that is inside frame buffer in ESP32
for (int i = 0; i < 600; i++)
{ // Write 600 black pixels at random locations
display.drawPixel(random(0, 799), random(0, 599), BLACK);
}
displayCurrentAction("Drawing 600 random pixels");
display.display(); // Write everything from frame buffer to screen
delay(DELAY_MS); // Wait
// Draw two diagonal lines accros screen
display.clearDisplay();
display.drawLine(
0, 0, 799, 599,
BLACK); // All of those drawing fuctions originate from Adafruit GFX library, so maybe you are already familiar
display.drawLine(799, 0, 0, 599, BLACK); // with those. Arguments are: start X, start Y, ending X, ending Y, color.
displayCurrentAction("Drawing two diagonal lines");
display.display();
delay(DELAY_MS);
// And again, let's draw some random lines on screen!
display.clearDisplay();
for (int i = 0; i < 50; i++)
{
display.drawLine(random(0, 799), random(0, 599), random(0, 799), random(0, 599), BLACK);
}
displayCurrentAction("Drawing 50 random lines");
display.display();
delay(DELAY_MS);
// Let's draw some random thick lines on screen!
display.clearDisplay();
for (int i = 0; i < 50; i++)
{
display.drawThickLine(random(0, 799), random(0, 599), random(0, 799), random(0, 599), BLACK,
(float)random(1, 20));
}
displayCurrentAction("Drawing 50 random lines");
display.display();
delay(DELAY_MS);
// Now draw one horizontal...
display.clearDisplay();
display.drawFastHLine(100, 100, 600, BLACK); // Arguments are: starting X, starting Y, length, color
displayCurrentAction("Drawing one horizontal line");
display.display();
delay(DELAY_MS);
//... and one vertical line
display.clearDisplay();
display.drawFastVLine(100, 100, 400, BLACK); // Arguments are: starting X, starting Y, length, color
displayCurrentAction("Drawing one vertical line");
display.display();
delay(DELAY_MS);
// Now, let' make a grid using only horizontal and vertical lines
display.clearDisplay();
for (int i = 0; i < 800; i += 8)
{
display.drawFastVLine(i, 0, 600, BLACK);
}
for (int i = 0; i < 600; i += 4)
{
display.drawFastHLine(0, i, 800, BLACK);
}
displayCurrentAction("Drawing a grid using horizontal and vertical lines");
display.display();
delay(DELAY_MS);
// Draw rectangle at X = 200, Y = 200 and size of 400x300 pixels
display.clearDisplay();
display.drawRect(200, 200, 400, 300, BLACK); // Arguments are: start X, start Y, size X, size Y, color
displayCurrentAction("Drawing rectangle");
display.display();
delay(DELAY_MS);
// Draw rectangles on random location, size 100x150 pixels
display.clearDisplay();
for (int i = 0; i < 50; i++)
{
display.drawRect(random(0, 799), random(0, 599), 100, 150, BLACK);
}
displayCurrentAction("Drawing many rectangles");
display.display();
delay(DELAY_MS);
// Draw filled black rectangle at X = 200, Y = 200, size of 400x300 pixels
display.clearDisplay();
display.fillRect(200, 200, 400, 300, BLACK); // Arguments are: start X, start Y, size X, size Y, color
displayCurrentAction("Drawing black rectangle");
display.display();
delay(DELAY_MS);
// Draw filled black rectangles on random location, size of 30x30 pixels
display.clearDisplay();
for (int i = 0; i < 50; i++)
{
display.fillRect(random(0, 799), random(0, 599), 30, 30, BLACK);
}
displayCurrentAction("Drawing many filled rectangles randomly");
display.display();
delay(DELAY_MS);
// Draw circle at center of a screen with radius of 75 pixels
display.clearDisplay();
display.drawCircle(400, 300, 75, BLACK); // Arguments are: start X, start Y, radius, color
displayCurrentAction("Drawing a circle");
display.display();
delay(DELAY_MS);
// Draw some circles at random location with radius of 25 pixels
display.clearDisplay();
for (int i = 0; i < 40; i++)
{
display.drawCircle(random(0, 799), random(0, 599), 25, BLACK);
}
displayCurrentAction("Drawing many circles randomly");
display.display();
delay(DELAY_MS);
// Draw black filled circle at center of a screen with radius of 75 pixels
display.clearDisplay();
display.fillCircle(400, 300, 75, BLACK); // Arguments are: start X, start Y, radius, color
displayCurrentAction("Drawing black-filled circle");
display.display();
delay(DELAY_MS);
// Draw some black filled circles at random location with radius of 15 pixels
display.clearDisplay();
for (int i = 0; i < 40; i++)
{
display.fillCircle(random(0, 799), random(0, 599), 15, BLACK);
}
displayCurrentAction("Drawing many filled circles randomly");
display.display(); // To show stuff on screen, you always need to call display.display();
delay(DELAY_MS);
// Draw rounded rectangle at X = 200, Y = 200 and size of 400x300 pixels and radius of 10 pixels
display.clearDisplay();
display.drawRoundRect(200, 200, 400, 300, 10,
BLACK); // Arguments are: start X, start Y, size X, size Y, radius, color
displayCurrentAction("Drawing rectangle with rounded edges");
display.display();
delay(DELAY_MS);
// Draw rounded rectangles on random location, size 100x150 pixels, radius of 5 pixels
display.clearDisplay();
for (int i = 0; i < 50; i++)
{
display.drawRoundRect(random(0, 799), random(0, 599), 100, 150, 5, BLACK);
}
displayCurrentAction("Drawing many rounded edges rectangles");
display.display();
delay(DELAY_MS);
// Draw filled black rect at X = 200, Y = 200, size of 400x300 pixels and radius of 10 pixels
display.clearDisplay();
display.fillRoundRect(200, 200, 400, 300, 10,
BLACK); // Arguments are: start X, start Y, size X, size Y, radius, color
displayCurrentAction("This is filled rectangle with rounded edges");
display.display();
delay(DELAY_MS);
// Draw filled black rects on random location, size of 30x30 pixels, radius of 3 pixels
display.clearDisplay();
for (int i = 0; i < 50; i++)
{
display.fillRoundRect(random(0, 799), random(0, 599), 30, 30, 3, BLACK);
}
displayCurrentAction("Random rounded edge filled rectangles");
display.display();
delay(DELAY_MS);
// Draw simple triangle
display.clearDisplay();
display.drawTriangle(250, 400, 550, 400, 400, 100, BLACK); // Arguments are: X1, Y1, X2, Y2, X3, Y3, color
display.display();
delay(DELAY_MS);
// Draw filled triangle inside simple triangle (so no display.clearDisplay() this time)
display.fillTriangle(300, 350, 500, 350, 400, 150, BLACK); // Arguments are: X1, Y1, X2, Y2, X3, Y3, color
displayCurrentAction("Drawing filled triangle inside exsisting one");
display.display();
delay(DELAY_MS);
// Display some bitmap on screen. We are going to display e-radionica logo on display at location X = 200, Y = 200
// Image is 576x100 pixels and we want to every pixel of this bitmap to be black.
display.clearDisplay();
display.drawImage(logo, 100, 250, 576, 100,
BLACK); // Arguments are: array variable name, start X, start Y, size X, size Y, color
displayCurrentAction("Drawing e-radionica.com logo");
display.display();
delay(DELAY_MS);
// Write some text on screen with different sizes
display.clearDisplay();
for (int i = 0; i < 6; i++)
{
display.setTextSize(i +
1); // textSize parameter starts at 0 and goes up to 10 (larger won't fit Inkplate 6 screen)
display.setCursor(200, (i * i * 8)); // setCursor works as same as on LCD displays - sets "the cursor" at the
// place you want to write someting next
display.print("INKPLATE 6!"); // The actual text you want to show on e-paper as String
}
displayCurrentAction("Text in different sizes and shadings");
display.display(); // To show stuff on screen, you always need to call display.display();
delay(DELAY_MS);
// Write same text on different location, but now invert colors (text is white, text background is black), without
// cleaning the previous text
display.setTextColor(
WHITE, BLACK); // First argument is text color, while second argument is background color. In BW, there are
for (int i = 0; i < 6; i++)
{ // only two options: BLACK & WHITE
display.setTextSize(i + 1);
display.setCursor(200, 300 + (i * i * 8));
display.print("INKPLATE 6!");
}
display.display();
delay(DELAY_MS);
// Draws an elipse with x radius, y radius, center x, center y and color
display.clearDisplay();
display.drawElipse(100, 200, 400, 300, BLACK);
displayCurrentAction("Drawing an elipse");
display.display();
delay(DELAY_MS);
// Fills an elipse with x radius, y radius, center x, center y and color
display.clearDisplay();
display.fillElipse(100, 200, 400, 300, BLACK);
displayCurrentAction("Drawing a filled elipse");
display.display();
delay(DELAY_MS);
// Code block for generating random points and sorting them in a counter
// clockwise direction.
int xt[10];
int yt[10];
int n = 10;
for (int i = 0; i < n; ++i)
{
xt[i] = random(100, 700);
yt[i] = random(100, 500);
}
int k;
for (int i = 0; i < n - 1; ++i)
for (int j = i + 1; j < n; ++j)
if (atan2(yt[j] - 300, xt[j] - 400) < atan2(yt[i] - 300, xt[i] - 400))
{
k = xt[i], xt[i] = xt[j], xt[j] = k;
k = yt[i], yt[i] = yt[j], yt[j] = k;
}
// Draws a polygon, from x and y coordinate arrays of n points in color c
display.clearDisplay();
display.drawPolygon(xt, yt, n, BLACK);
displayCurrentAction("Drawing a polygon");
display.display();
delay(DELAY_MS);
// Fills a polygon, from x and y coordinate arrays of n points in color c,
// Points need to be counter clockwise sorted
// Method can be quite slow for now, probably will improve
display.clearDisplay();
display.fillPolygon(xt, yt, n, BLACK);
displayCurrentAction("Drawing a filled polygon");
display.display();
delay(DELAY_MS);
// Write text and rotate it by 90 deg. forever
int r = 0;
display.setTextSize(8);
display.setTextColor(WHITE, BLACK);
while (true)
{
display.setCursor(100, 100);
display.clearDisplay();
display.setRotation(
r); // Set rotation will sent rotation for the entire display, so you can use it sideways or upside-down
display.print("INKPLATE6");
display.display();
r++;
delay(DELAY_MS);
}
}
// Small function that will write on the screen what function is currently in demonstration.
void displayCurrentAction(String text)
{
display.setTextSize(2);
display.setCursor(2, 580);
display.print(text);
}

View File

@ -0,0 +1,372 @@
/*
Basic_gray example for e-radionica.com Inkplate 6
For this example you will need only USB cable and Inkplate 6
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example will show you how you can draw some simple graphics using
Adafruit GFX functions. Yes, Inkplate library is 100% compatible with GFX lib!
Learn more about Adafruit GFX: https://learn.adafruit.com/adafruit-gfx-graphics-library
Inkplate will be used in gray mode which is 3 bit, so you can have up to 8 different colors (black, 6 gray
colors and white) Color is represented by number, where number 0 means black and number 7 means white, while
everything in between are shades of gray.
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
#include "image.h" //Include image file that holds gray image data. You can see it in next tab inside Arduino IDE.
Inkplate display(INKPLATE_3BIT); // Create object on Inkplate library and set library to work in gray mode (3-bit)
// Other option is BW mode, which is demonstrated in next example
// "Inkplate_basic_BW"
#define DELAY_MS \
5000 //Delay in milliseconds between screen refresh. Refreshing e-paper screens more often than 5s is not recommended \
//Want to refresh faster? Use partial update! Find example in "Inkplate-basic_partial_update"
void setup()
{
display.begin(); // Init library (you should call this function ONLY ONCE)
display.clearDisplay(); // Clear any data that may have been in (software) frame buffer.
//(NOTE! This does not clean image on screen, it only clears it in the frame buffer inside
// ESP32).
display.clean(); // Clear everything that has previously been on a screen
display.setTextColor(0, 7);
display.setCursor(150, 320);
display.setTextSize(4);
display.print("Welcome to Inkplate 6!");
display.display(); // Write hello message
delay(5000); // Wait a little bit
}
void loop()
{
// Example will demostrate funcionality one by one. You always first set everything in the frame buffer and
// afterwards you show it on the screen using display.display().
// Let'sstart by drawing pixel at x = 100 and y = 50 location
display.clearDisplay(); // Clear everytning that is inside frame buffer in ESP32
display.drawPixel(100, 50, 0); // Draw one black pixel at X = 100, Y = 50 position in 0 (BLACK) color
displayCurrentAction(
"Drawing a pixel"); // Function which writes small text at bottom left indicating what's currently done
// NOTE: you do not need displayCurrentAction function to use Inkplate!
display.display(); // Send image to display. You need to call this one each time you want to transfer frame buffer
// to the screen.
delay(DELAY_MS); // Wait a little bit
// Now, let's draw some random pixels!
display.clearDisplay(); // Clear everything that is inside frame buffer in ESP32
for (int i = 0; i < 1000; i++)
{ // Write 1000 random colored pixels at random locations
display.drawPixel(random(0, 799), random(0, 599),
random(0, 7)); // We are setting color of the pixels using numbers from 0 to 7,
} // where 0 mens black, 7 white and gray is in between
displayCurrentAction("Drawing 600 random pixels in random colors");
display.display(); // Write everything from frame buffer to screen
delay(DELAY_MS); // Wait
// Draw two diagonal lines accros screen
display.clearDisplay();
display.drawLine(
0, 0, 799, 599,
0); // All of those drawing fuctions originate from Adafruit GFX library, so maybe you are already familiar
display.drawLine(799, 0, 0, 599, 0); // with those. Arguments are: start X, start Y, ending X, ending Y, color.
displayCurrentAction("Drawing two diagonal lines");
display.display();
delay(DELAY_MS);
// And again, let's draw some random lines on screen!
display.clearDisplay();
for (int i = 0; i < 100; i++)
{
display.drawLine(random(0, 799), random(0, 599), random(0, 799), random(0, 599), random(0, 7));
}
displayCurrentAction("Drawing 50 random lines in random colors");
display.display();
delay(DELAY_MS);
// Let's draw some random thick lines on screen!
display.clearDisplay();
for (int i = 0; i < 100; i++)
{
display.drawThickLine(random(0, 799), random(0, 599), random(0, 799), random(0, 599), random(0, 7),
(float)random(1, 20));
}
displayCurrentAction("Drawing 50 random lines in random colors and thickness");
display.display();
delay(DELAY_MS);
// Let's draw some random gradient thick lines on screen!
display.clearDisplay();
for (int i = 0; i < 100; i++)
{
int startColor = random(0, 7);
int endColor = random(startColor, 7);
display.drawGradientLine(random(0, 799), random(0, 599), random(0, 799), random(0, 599), startColor, endColor,
(float)random(1, 20));
}
displayCurrentAction("Drawing 50 random gradient lines in random colors and thickness");
display.display();
delay(DELAY_MS);
// Now draw one horizontal...
display.clearDisplay();
display.drawFastHLine(100, 100, 600, 0); // Arguments are: starting X, starting Y, length, color
displayCurrentAction("Drawing one horizontal line");
display.display();
delay(DELAY_MS);
//... and one vertical line
display.clearDisplay();
display.drawFastVLine(100, 100, 400, 0); // Arguments are: starting X, starting Y, length, color
displayCurrentAction("Drawing one vertical line");
display.display();
delay(DELAY_MS);
// Now, let' make a grid using only horizontal and vertical lines in random colors!
display.clearDisplay();
for (int i = 0; i < 800; i += 8)
{
display.drawFastVLine(i, 0, 600, (i / 8) & 0x0F);
}
for (int i = 0; i < 600; i += 4)
{
display.drawFastHLine(0, i, 800, (i / 8) & 0x0F);
}
displayCurrentAction("Drawing a grid using horizontal and vertical lines in different colors");
display.display();
delay(DELAY_MS);
// Draw rectangle at X = 200, Y = 200 and size of 400x300 pixels
display.clearDisplay();
display.drawRect(200, 200, 400, 300, 0); // Arguments are: start X, start Y, size X, size Y, color
displayCurrentAction("Drawing rectangle");
display.display();
delay(DELAY_MS);
// Draw rectangles on random location, size 100x150 pixels in random color
display.clearDisplay();
for (int i = 0; i < 50; i++)
{
display.drawRect(random(0, 799), random(0, 599), 100, 150, random(0, 7));
}
displayCurrentAction("Drawing many rectangles in random colors");
display.display();
delay(DELAY_MS);
// Draw filled black rectangle at X = 200, Y = 200, size of 400x300 pixels in gray color
display.clearDisplay();
display.fillRect(200, 200, 400, 300, 4); // Arguments are: start X, start Y, size X, size Y, color
displayCurrentAction("Drawing gray rectangle");
display.display();
delay(DELAY_MS);
// Draw filled random colored rectangles on random location, size of 30x30 pixels in radnom color
display.clearDisplay();
for (int i = 0; i < 50; i++)
{
display.fillRect(random(0, 799), random(0, 599), 30, 30, random(0, 7));
}
displayCurrentAction("Drawing many filled rectangles randomly in random colors");
display.display();
delay(DELAY_MS);
// Draw circle at center of a screen with radius of 75 pixels
display.clearDisplay();
display.drawCircle(400, 300, 75, 0); // Arguments are: start X, start Y, radius, color
displayCurrentAction("Drawing a circle");
display.display();
delay(DELAY_MS);
// Draw some random colored circles at random location with radius of 25 pixels in random color
display.clearDisplay();
for (int i = 0; i < 40; i++)
{
display.drawCircle(random(0, 799), random(0, 599), 25, random(0, 7));
}
displayCurrentAction("Drawing many circles randomly in random colors");
display.display();
delay(DELAY_MS);
// Draw black filled circle at center of a screen with radius of 75 pixels
display.clearDisplay();
display.fillCircle(400, 300, 75, 0); // Arguments are: start X, start Y, radius, color
displayCurrentAction("Drawing black-filled circle");
display.display();
delay(DELAY_MS);
// Draw some random colored filled circles at random location with radius of 15 pixels
display.clearDisplay();
for (int i = 0; i < 40; i++)
{
display.fillCircle(random(0, 799), random(0, 599), 15, random(0, 7));
}
displayCurrentAction("Drawing many filled circles randomly in random colors");
display.display(); // To show stuff on screen, you always need to call display.display();
delay(DELAY_MS);
// Draw rounded rectangle at X = 200, Y = 200 and size of 400x300 pixels and radius of 10 pixels
display.clearDisplay();
display.drawRoundRect(200, 200, 400, 300, 10, 0); // Arguments are: start X, start Y, size X, size Y, radius, color
displayCurrentAction("Drawing rectangle with rounded edges");
display.display();
delay(DELAY_MS);
// Draw rounded rectangles on random location, size 100x150 pixels, radius of 5 pixels in radnom color
display.clearDisplay();
for (int i = 0; i < 50; i++)
{
display.drawRoundRect(random(0, 799), random(0, 599), 100, 150, 5, random(0, 7));
}
displayCurrentAction("Drawing many rounded edges rectangles");
display.display();
delay(DELAY_MS);
// Draw filled random colored rectangle at X = 200, Y = 200, size of 400x300 pixels and radius of 10 pixels
display.clearDisplay();
display.fillRoundRect(200, 200, 400, 300, 10, 0); // Arguments are: start X, start Y, size X, size Y, radius, color
displayCurrentAction("Drawing filled rectangle with rounded edges");
display.display();
delay(DELAY_MS);
// Draw filled random colored rectangle on random location, size of 30x30 pixels, radius of 3 pixels in radnom color
display.clearDisplay();
for (int i = 0; i < 50; i++)
{
display.fillRoundRect(random(0, 799), random(0, 599), 30, 30, 3, random(0, 7));
}
displayCurrentAction("Drawing many filled rectangle with rounded edges in random colors");
display.display();
delay(DELAY_MS);
// Draw simple triangle
display.clearDisplay();
display.drawTriangle(250, 400, 550, 400, 400, 100, 0); // Arguments are: X1, Y1, X2, Y2, X3, Y3, color
display.display();
delay(DELAY_MS);
// Draw filled triangle inside simple triangle (so no display.clearDisplay() this time)
display.fillTriangle(300, 350, 500, 350, 400, 150, 0); // Arguments are: X1, Y1, X2, Y2, X3, Y3, color
displayCurrentAction("Drawing filled triangle inside exsisting one");
display.display();
delay(DELAY_MS);
// Display some grayscale image on screen. We are going to display e-radionica logo on display at location X = 100,
// Y = 100 Image size is 500x332 pixels.
display.clearDisplay();
display.drawImage(picture1, 100, 100, 500,
332); // Arguments are: array variable name, start X, start Y, size X, size Y
displayCurrentAction("Drawing a bitmap image");
display.display();
delay(DELAY_MS);
// Write some text on screen with different sizes and color
display.clearDisplay();
for (int i = 0; i < 6; i++)
{
display.setTextColor(i);
display.setTextSize(i +
1); // textSize parameter starts at 0 and goes up to 10 (larger won't fit Inkplate 6 screen)
display.setCursor(200, (i * i * 8)); // setCursor works as same as on LCD displays - sets "the cursor" at the
// place you want to write someting next
display.print("INKPLATE6!"); // The actual text you want to show on e-paper as String
}
displayCurrentAction("Text in different sizes and shadings");
display.display(); // To show stuff on screen, you always need to call display.display();
delay(DELAY_MS);
// Write same text on different location, but now invert colors (text is white, text background is black)
display.setTextColor(7, 0); // First argument is text color, while second argument is background color. In
// greyscale,
for (int i = 0; i < 6; i++)
{ // you are able to choose from 8 different colors (0-7)
display.setTextSize(i + 1);
display.setCursor(200, 300 + (i * i * 8));
display.print("INKPLATE6!");
}
display.display();
delay(DELAY_MS);
// Draws an elipse with x radius, y radius, center x, center y and color
display.clearDisplay();
display.drawElipse(100, 200, 400, 300, 0);
displayCurrentAction("Drawing an elipse");
display.display();
delay(DELAY_MS);
// Fills an elipse with x radius, y radius, center x, center y and color
display.clearDisplay();
display.fillElipse(100, 200, 400, 300, 0);
displayCurrentAction("Drawing a filled elipse");
display.display();
delay(DELAY_MS);
// Code block for generating random points and sorting them in a counter
// clockwise direction.
int xt[10];
int yt[10];
int n = 10;
for (int i = 0; i < n; ++i)
{
xt[i] = random(100, 700);
yt[i] = random(100, 500);
}
int k;
for (int i = 0; i < n - 1; ++i)
for (int j = i + 1; j < n; ++j)
if (atan2(yt[j] - 300, xt[j] - 400) < atan2(yt[i] - 300, xt[i] - 400))
{
k = xt[i], xt[i] = xt[j], xt[j] = k;
k = yt[i], yt[i] = yt[j], yt[j] = k;
}
// Draws a polygon, from x and y coordinate arrays of n points in color c
display.clearDisplay();
display.drawPolygon(xt, yt, n, 0);
displayCurrentAction("Drawing a polygon");
display.display();
delay(DELAY_MS);
// Fills a polygon, from x and y coordinate arrays of n points in color c,
// Points need to be counter clockwise sorted
// Method can be quite slow for now, probably will improve
display.clearDisplay();
display.fillPolygon(xt, yt, n, 0);
displayCurrentAction("Drawing a filled polygon");
display.display();
delay(DELAY_MS);
// Write text and rotate it by 90 deg. forever
int r = 0;
display.setTextSize(8);
display.setTextColor(7, 0);
while (true)
{
display.setCursor(100, 100);
display.clearDisplay();
display.setRotation(
r); // Set rotation will sent rotation for the entire display, so you can use it sideways or upside-down
display.print("INKPLATE6");
display.display();
r++;
delay(DELAY_MS);
}
// Did you know that you can change between BW and greyscale mode anytime?
// Just call Inkplate display(INKPLATE_1BIT) or Inkplate display(INKPLATE_3BIT)
}
// Small function that will write on the screen what function is currently in demonstration.
void displayCurrentAction(String text)
{
display.setTextSize(2);
display.setCursor(2, 580);
display.print(text);
}

View File

@ -0,0 +1,163 @@
/*
Game_Of_Life_by_claud9999 example for e-radionica Inkplate 6
For this example you will need only USB cable and Inkplate 6
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
Our first community created example, made by: https://github.com/claud9999
To run it, jut upload the code and watch Conways game of life animation!
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
24 September 2020 by e-radionica.com
*/
#include <Inkplate.h>
Inkplate display(INKPLATE_1BIT);
#define FULLREFRESH 40
#define SCREEN_WIDTH 800
#define SCREEN_HEIGHT 600
#define MIN_CELLSZ 8
#define MAX_CELLSZ 40
// Initialize dimensions to the minimum size cell, maximum size arrays
int cell_size = 0, cols = 0, rows = 0, cell_maxage = 0, offset_x = 0, offset_y = 0;
char grid_a[(SCREEN_WIDTH / MIN_CELLSZ) * (SCREEN_HEIGHT / MIN_CELLSZ)],
grid_b[(SCREEN_WIDTH / MIN_CELLSZ) * (SCREEN_HEIGHT / MIN_CELLSZ)];
char *grid_curr = grid_a, *grid_next = grid_b, *grid_tmp = NULL, cell_curr, cell_next;
int dx = 0, dy = 0, nx = 0, ny = 0, neighbors = 0, cell_delta = 0, frame_count = 0;
void randomize()
{
cell_size = random(MIN_CELLSZ, MAX_CELLSZ + 1);
// Compute the (rounded-down) number of rows and columns
cols = SCREEN_WIDTH / cell_size;
rows = SCREEN_HEIGHT / cell_size;
cell_maxage = (cell_size / 2) - 1;
// Compute the "extra" space not covered by this grid, offset by half
offset_x = (SCREEN_WIDTH - cols * cell_size) / 2;
offset_y = (SCREEN_HEIGHT - rows * cell_size) / 2;
display.clean();
display.display();
display.clearDisplay();
// Compute a random density...
int density = random(5, 15);
// And for that density, populate the initial grid
for (int j = 0; j < cols; j++)
{
for (int i = 0; i < rows; i++)
grid_curr[j + i * cols] = random(density) == 0;
}
frame_count = 0;
}
void setup()
{
Serial.begin(115200);
display.begin();
randomize();
}
void loop()
{
cell_delta = 0;
for (int j = 0; j < cols; j++)
{
for (int i = 0; i < rows; i++)
{
// Count neighboring cells
neighbors = 0;
for (dx = -1; dx < 2; dx++)
{
for (dy = -1; dy < 2; dy++)
{
if (dx == 0 && dy == 0)
continue; // Skip "me"
nx = j + dx;
if (nx < 0)
nx = cols - 1;
else if (nx >= cols)
nx = 0;
ny = i + dy;
if (ny < 0)
ny = rows - 1;
else if (ny >= rows)
ny = 0;
if (grid_curr[nx + ny * cols])
neighbors++;
}
}
cell_curr = grid_curr[j + i * cols];
cell_next = 0;
switch (neighbors)
{
case 2: // Alive with 2 neighbors remains alive
if (!cell_curr)
break;
// Else cell is alive drop through
case 3: // 3 neighbors == alive
cell_next = cell_curr + 1;
if (cell_next > cell_maxage)
cell_next = cell_maxage;
}
if (cell_next != 0 && cell_curr == 0 || cell_next == 0 && cell_curr != 0)
cell_delta++;
if (cell_next)
{
// If this is a new cell, paint it black
if (cell_next == 1)
display.fillRect(j * cell_size + offset_x, i * cell_size + offset_y, cell_size, cell_size, 1);
// Otherwise paint the inside white depending on how old it is
else
display.fillRect(j * cell_size + cell_size / 2 - cell_next + offset_x,
i * cell_size + cell_size / 2 - cell_next + offset_y, cell_next * 2, cell_next * 2,
0);
}
else if (cell_curr)
{
// Otherwise it's died, paint the whole cell white
display.fillRect(j * cell_size + offset_x, i * cell_size + offset_y, cell_size, cell_size, 0);
}
grid_next[j + i * cols] = cell_next;
}
}
// Swap which grid is current
grid_tmp = grid_next;
grid_next = grid_curr;
grid_curr = grid_tmp;
// The longer this goes, the more cells this has,
// The more change is required or we reset
if (cell_delta * cell_size < frame_count)
randomize();
else
frame_count++;
// Update whole screen after FULLREFRESH partials
if (frame_count % FULLREFRESH == 0)
display.display();
else
display.partialUpdate();
}

View File

@ -1,39 +1,41 @@
/*
2_Inkplate_Clean_Screen sketch for e-radionica.com Inkplate 6
Inkplate_Clean_Screen sketch for e-radionica.com Inkplate 6
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
The burn-in effect is when you can see the previous picture on the screen faded in the background.
It is not unusual or defect, it's normal behaviour of e-paper screen.
It is not unusual or defect, it's normal behaviour of e-paper screen.
Nevertheless, sometime the burn-in effect can be too strong and noticeable. In that case, you can
run this sketch to clean your screen.
The sketch didn't help? Refrigerate your Inkplate for 60 minutes!
The sketch didn't help? Refrigerate your Inkplate for 60 minutes!
NOTE: burn-in effect is much stronger at the direct sun of when exposed to heat source.
e-paper screens are not intedted to be used at strong sun and in hot enviroments.
e-paper screens are not intented to be used at strong sun and in hot enviroments.
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include <Inkplate.h> //Add Inkplate library
Inkplate display(INKPLATE_1BIT); //Init the library
#include <Inkplate.h> //Add Inkplate library
Inkplate display(INKPLATE_1BIT); // Init the library
void setup() {
display.begin(); //Call this only once!
void setup()
{
display.begin(); // Call this only once!
//We will write "empty" screen to the Inkplate screen for 10 times in the row.
//The result should be completly clean screen.
for(int i = 0; i < 10; i++){
display.clean(); //First, clean the buffer so it's completly empty
display.display(); //Now, send that empty buffer to the screen 10 times
delay(1000); //Just a random delay, not actually needed
}
// We will write "empty" screen to the Inkplate screen for 10 times in the row.
// The result should be completly clean screen.
for (int i = 0; i < 10; i++)
{
display.clean(); // First, clean the buffer so it's completly empty
display.display(); // Now, send that empty buffer to the screen 10 times
delay(1000); // Just a random delay, not actually needed
}
}
void loop() {
void loop()
{
}

View File

@ -0,0 +1,88 @@
/*
Inkplate_Mandelbrot_set sketch for e-radionica.com Inkplate 6
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example renders the mandelbrot set to coordiantes to Inkplate.
Due to the nature of Mandelbrot set, it is quite slow on low powered MCUs, so please be patient :)
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h"
#define MAXITERATIONS 150
Inkplate display(INKPLATE_1BIT);
// Takes a long time to render, cca 3 minutes
// Explore different positions to draw
// Some interesting ones can be found here http://www.cuug.ab.ca/dewara/mandelbrot/Mandelbrowser.html
double xFrom = -0.7423, xTo = -0.8463;
double yFrom = 0.1092, yTo = 0.2102;
void setup()
{
Serial.begin(115200);
display.begin();
}
void loop()
{
display.clearDisplay();
for (int j = 0; j < 600; ++j)
{
for (int i = 0; i < 800; ++i)
display.drawPixel(
i, j, colorAt(xFrom + (double)i * (xTo - xFrom) / 800.0, yFrom + (double)j * (yTo - yFrom) / 600.0));
// for whole set:
// display.drawPixel(i, j, colorAt(-2.0 + (3.0 * (double)i / 800.0), -1.0 + 2.0 * (double)j / 600.0));
Serial.println(j);
}
display.display();
delay(5000);
}
struct complex
{
double re;
double im;
};
void addComplex(struct complex *z, struct complex *c)
{
z->re += c->re;
z->im += c->im;
}
void squareComplex(struct complex *z)
{
double re = z->re;
double im = z->im;
z->re = re * re - im * im;
z->im = 2 * re * im;
}
double modulusComplexSqr(struct complex *z)
{
return z->re * z->re + z->im * z->im;
}
uint8_t colorAt(double x, double y)
{
struct complex z = {0.0, 0.0};
struct complex c = {x, y};
int i;
for (i = 0; i < MAXITERATIONS && modulusComplexSqr(&z) <= 4.0; ++i)
{
squareComplex(&z);
addComplex(&z, &c);
}
return i == MAXITERATIONS;
}

View File

@ -0,0 +1,147 @@
/*
Inkplate_Maze_Generator sketch for e-radionica.com Inkplate 6
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example renders a random maze every time!
You can write on it with a whiteboard marker or a graphite pen to solve it.
Just be sure not to use pernament markers!
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include "Inkplate.h"
// Initialise Inkplate object
Inkplate display(INKPLATE_1BIT);
// Here we define one cell size
const int cellSize = 10;
// Calculate screen width and height
const int w = 790 / cellSize, h = 590 / cellSize;
char maze[w * h];
// Move direction difference array
int dx[] = {-1, 0, 0, 1};
int dy[] = {0, -1, 1, 0};
void setup()
{
// Initialise Inkplate
Serial.begin(115200);
display.begin();
pinMode(12, INPUT);
pinMode(13, INPUT);
// Generate and display the maze
generateMaze(maze, w, h);
showMaze(maze, w, h);
}
void loop()
{
}
// Display the maze
void showMaze(const char *maze, int width, int height)
{
for (int y = 0; y < height; ++y)
for (int x = 0; x < width; ++x)
if (maze[x + y * width] == 1)
for (int i = 0; i < 4; ++i)
{
int xx = x + dx[i];
int yy = y + dy[i];
if (0 <= xx && xx < w && 0 <= yy && yy < h && maze[yy * width + xx] == 1)
display.drawLine(3 + x * cellSize + cellSize / 2, 3 + y * cellSize + cellSize / 2,
3 + x * cellSize + cellSize / 2 + (dx[i] * cellSize / 2),
3 + y * cellSize + cellSize / 2 + (dy[i] * cellSize / 2), BLACK);
}
display.display();
}
// Carve the maze starting at x, y.
void carveMaze(char *maze, int width, int height, int x, int y)
{
int x1, y1;
int x2, y2;
int dx, dy;
int dir, count;
dir = random(4);
count = 0;
while (count < 4)
{
dx = 0;
dy = 0;
switch (dir)
{
case 0:
dx = 1;
break;
case 1:
dy = 1;
break;
case 2:
dx = -1;
break;
default:
dy = -1;
break;
}
x1 = x + dx;
y1 = y + dy;
x2 = x1 + dx;
y2 = y1 + dy;
if (x2 > 0 && x2 < width && y2 > 0 && y2 < height && maze[y1 * width + x1] == 1 && maze[y2 * width + x2] == 1)
{
maze[y1 * width + x1] = 0;
maze[y2 * width + x2] = 0;
x = x2;
y = y2;
dir = random(4);
count = 0;
}
else
{
dir = (dir + 1) % 4;
count += 1;
}
}
}
// Generate maze in matrix maze with size width, height.
void generateMaze(char *maze, int width, int height)
{
int x, y;
// Initialize the maze.
for (x = 0; x < width * height; x++)
{
maze[x] = 1;
}
maze[1 * width + 1] = 0;
// Seed the random number generator.
srand(time(0));
// Carve the maze.
for (y = 1; y < height; y += 2)
{
for (x = 1; x < width; x += 2)
{
carveMaze(maze, width, height, x, y);
}
}
// Set up the entry and exit.
maze[0 * width + 1] = 0;
maze[(height - 1) * width + (width - 2)] = 0;
}

View File

@ -0,0 +1,373 @@
/*
Inkplate_Peripheral_Mode sketch for e-radionica.com Inkplate 6
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
Using this sketch, you don't have to program and control e-paper using Arduino code.
Instead, you can send UART command (explained in documentation that can be found inside folder of this sketch).
This give you flexibility that you can use this Inkplate 6 on any platform!
Because it uses UART, it's little bit slower and it's not recommended to send bunch of
drawPixel command to draw some image. Instead, load bitmaps and pictures on SD card and load image from SD.
If we missed some function, you can modify this and make yor own.
Also, every Inkplate comes with this peripheral mode right from the factory.
Learn more about Peripheral Mode in this update:
https://www.crowdsupply.com/e-radionica/inkplate-6/updates/successfully-funded-also-third-party-master-controllers-and-partial-updates
UART settings are: 115200 baud, standard parity, ending with "\n\r" (both)
You can send commands via USB port or by directly connecting to ESP32 TX and RX pins.
Don't forget you need to send #L(1)* after each command to show it on the display
(equal to display.display()).
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15 July 2020 by e-radionica.com
*/
#include <Inkplate.h>
Inkplate display(INKPLATE_1BIT);
#define BUFFER_SIZE 1000
char commandBuffer[BUFFER_SIZE + 1];
char strTemp[2001];
void setup()
{
display.begin();
Serial.begin(115200);
memset(commandBuffer, 0, BUFFER_SIZE);
}
void loop()
{
// put your main code here, to run repeatedly:
if (Serial.available())
{
while (Serial.available())
{
for (int i = 0; i < (BUFFER_SIZE - 1); i++)
{
commandBuffer[i] = commandBuffer[i + 1];
}
commandBuffer[BUFFER_SIZE - 1] = Serial.read();
}
}
char *s = NULL;
char *e = NULL;
for (int i = 0; i < BUFFER_SIZE; i++)
{
if (commandBuffer[i] == '#' && s == NULL)
s = &commandBuffer[i];
if (commandBuffer[i] == '*' && e == NULL)
e = &commandBuffer[i];
}
if (s != NULL && e != NULL)
{
if ((e - s) > 0)
{
int x, x1, x2, y, y1, y2, x3, y3, l, c, w, h, r, n;
char b;
char temp[150];
switch (*(s + 1))
{
case '?':
Serial.print("OK");
break;
case '0':
sscanf(s + 3, "%d,%d,%d", &x, &y, &c);
// sprintf(temp, "display.drawPixel(%d, %d, %d)\n\r", x, y, c);
// Serial.print(temp);
display.drawPixel(x, y, c);
break;
case '1':
sscanf(s + 3, "%d,%d,%d,%d,%d", &x1, &y1, &x2, &y2, &c);
// sprintf(temp, "display.drawLine(%d, %d, %d, %d, %d)\n\r", x1, y1, x2, y2, c);
// Serial.print(temp);
display.drawLine(x1, y1, x2, y2, c);
break;
case '2':
sscanf(s + 3, "%d,%d,%d,%d", &x, &y, &l, &c);
// sprintf(temp, "display.drawFastVLine(%d, %d, %d, %d)\n\r", x, y, l, c);
// Serial.print(temp);
display.drawFastVLine(x, y, l, c);
break;
case '3':
sscanf(s + 3, "%d,%d,%d,%d", &x, &y, &l, &c);
// sprintf(temp, "display.drawFastHLine(%d, %d, %d, %d)\n\r", x, y, l, c);
// Serial.print(temp);
display.drawFastHLine(x, y, l, c);
break;
case '4':
sscanf(s + 3, "%d,%d,%d,%d,%d", &x, &y, &w, &h, &c);
// sprintf(temp, "display.drawRect(%d, %d, %d, %d, %d)\n\r", x, y, w, h, c);
// Serial.print(temp);
display.drawRect(x, y, w, h, c);
break;
case '5':
sscanf(s + 3, "%d,%d,%d,%d", &x, &y, &r, &c);
// sprintf(temp, "display.drawCircle(%d, %d, %d, %d)\n\r", x, y, r, c);
// Serial.print(temp);
display.drawCircle(x, y, r, c);
break;
case '6':
sscanf(s + 3, "%d,%d,%d,%d,%d,%d,%d", &x1, &y1, &x2, &y2, &x3, &y3, &c);
// sprintf(temp, "display.drawTriangle(%d, %d, %d, %d, %d, %d, %d)\n\r", x1, y1, x2, y2, x3, y3, c);
// Serial.print(temp);
display.drawTriangle(x1, y1, x2, y2, x3, y3, c);
break;
case '7':
sscanf(s + 3, "%d,%d,%d,%d,%d,%d", &x, &y, &w, &h, &r, &c);
// sprintf(temp, "display.drawRoundRect(%d, %d, %d, %d, %d, %d)\n\r", x, y, w, h, r, c);
// Serial.print(temp);
display.drawRoundRect(x, y, w, h, r, c);
break;
case '8':
sscanf(s + 3, "%d,%d,%d,%d,%d", &x, &y, &w, &h, &c);
// sprintf(temp, "display.fillRect(%d, %d, %d, %d, %d)\n\r", x, y, w, h, c);
// Serial.print(temp);
display.fillRect(x, y, w, h, c);
break;
case '9':
sscanf(s + 3, "%d,%d,%d,%d", &x, &y, &r, &c);
// sprintf(temp, "display.fillCircle(%d, %d, %d, %d)\n\r", x, y, r, c);
// Serial.print(temp);
display.fillCircle(x, y, r, c);
break;
case 'A':
sscanf(s + 3, "%d,%d,%d,%d,%d,%d,%d", &x1, &y1, &x2, &y2, &x3, &y3, &c);
// sprintf(temp, "display.fillTriangle(%d, %d, %d, %d, %d, %d, %d)\n\r", x1, y1, x2, y2, x3, y3, c);
// Serial.print(temp);
display.fillTriangle(x1, y1, x2, y2, x3, y3, c);
break;
case 'B':
sscanf(s + 3, "%d,%d,%d,%d,%d,%d", &x, &y, &w, &h, &r, &c);
// sprintf(temp, "display.fillRoundRect(%d, %d, %d, %d, %d, %d)\n\r", x, y, w, h, r, c);
// Serial.print(temp);
display.fillRoundRect(x, y, w, h, r, c);
break;
case 'C':
sscanf(s + 3, "\"%2000[^\"]\"", strTemp);
n = strlen(strTemp);
for (int i = 0; i < n; i++)
{
strTemp[i] = toupper(strTemp[i]);
}
for (int i = 0; i < n; i += 2)
{
strTemp[i / 2] = (hexToChar(strTemp[i]) << 4) | (hexToChar(strTemp[i + 1]) & 0x0F);
}
strTemp[n / 2] = 0;
// Serial.print("display.print(\"");
// Serial.print(strTemp);
// Serial.println("\");");
display.print(strTemp);
break;
case 'D':
sscanf(s + 3, "%d", &c);
// sprintf(temp, "display.setTextSize(%d)\n", c);
// Serial.print(temp);
display.setTextSize(c);
break;
case 'E':
sscanf(s + 3, "%d,%d", &x, &y);
// sprintf(temp, "display.setCursor(%d, %d)\n", x, y);
// Serial.print(temp);
display.setCursor(x, y);
break;
case 'F':
sscanf(s + 3, "%c", &b);
// sprintf(temp, "display.setTextWrap(%s)\n", b == 'T' ? "True" : "False");
// Serial.print(temp);
if (b == 'T')
display.setTextWrap(true);
if (b == 'F')
display.setTextWrap(false);
break;
case 'G':
sscanf(s + 3, "%d", &c);
c &= 3;
// sprintf(temp, "display.setRotation(%d)\n", c);
// Serial.print(temp);
display.setRotation(c);
break;
case 'H':
sscanf(s + 3, "%d,%d,\"%149[^\"]\"", &x, &y, strTemp);
n = strlen(strTemp);
for (int i = 0; i < n; i++)
{
strTemp[i] = toupper(strTemp[i]);
}
for (int i = 0; i < n; i += 2)
{
strTemp[i / 2] = (hexToChar(strTemp[i]) << 4) | (hexToChar(strTemp[i + 1]) & 0x0F);
}
strTemp[n / 2] = 0;
r = display.sdCardInit();
if (r)
{
r = display.drawBitmapFromSd(strTemp, x, y);
Serial.print("#H(");
Serial.print(r, DEC);
Serial.println(")*");
Serial.flush();
// sprintf(temp, "display.drawBitmap(%d, %d, %s)\n", x, y, strTemp);
// Serial.print(temp);
}
else
{
Serial.println("#H(-1)*");
Serial.flush();
}
break;
case 'I':
sscanf(s + 3, "%d", &c);
// sprintf(temp, "display.setDisplayMode(%s)\n", c == 0 ? "INKPLATE_1BIT" : "INKPLATE_3BIT");
// Serial.print(temp);
if (c == INKPLATE_1BIT)
display.selectDisplayMode(INKPLATE_1BIT);
if (c == INKPLATE_3BIT)
display.selectDisplayMode(INKPLATE_3BIT);
break;
case 'J':
sscanf(s + 3, "%c", &b);
if (b == '?')
{
// if (0 == 0) {
// Serial.println("#J(0)*");
//} else {
// Serial.println("#J(1)*");
//}
if (display.getDisplayMode() == INKPLATE_1BIT)
{
Serial.println("#J(0)*");
Serial.flush();
}
if (display.getDisplayMode() == INKPLATE_3BIT)
{
Serial.println("#J(1)*");
Serial.flush();
}
}
break;
case 'K':
sscanf(s + 3, "%c", &b);
if (b == '1')
{
// Serial.print("display.clearDisplay();\n");
display.clearDisplay();
}
break;
case 'L':
sscanf(s + 3, "%c", &b);
if (b == '1')
{
// Serial.print("display.display();\n");
display.display();
}
break;
case 'M':
sscanf(s + 3, "%d,%d,%d", &y1, &x2, &y2);
// sprintf(temp, "display.partialUpdate(%d, %d, %d);\n", y1, x2, y2);
// Serial.print(temp);
display.partialUpdate();
break;
case 'N':
sscanf(s + 3, "%c", &b);
if (b == '?')
{
Serial.print("#N(");
Serial.print(display.readTemperature(), DEC);
// Serial.print(23, DEC);
Serial.println(")*");
Serial.flush();
}
break;
case 'O':
sscanf(s + 3, "%d", &c);
if (c >= 0 && c <= 2)
{
Serial.print("#O(");
Serial.print(display.readTouchpad(c), DEC);
// Serial.print(0, DEC);
Serial.println(")*");
Serial.flush();
}
break;
case 'P':
sscanf(s + 3, "%c", &b);
if (b == '?')
{
Serial.print("#P(");
Serial.print(display.readBattery(), 2);
// Serial.print(3.54, 2);
Serial.println(")*");
Serial.flush();
}
break;
case 'Q':
sscanf(s + 3, "%d", &c);
c &= 1;
// if (c == 0) Serial.print("display.einkOff();\n");
// if (c == 1) Serial.print("display.einkOn();\n");
if (c == 0)
display.einkOff();
if (c == 1)
display.einkOn();
break;
case 'R':
sscanf(s + 3, "%c", &b);
if (b == '?')
{
Serial.print("#R(");
Serial.print(display.getPanelState(), DEC);
// Serial.print(1, DEC);
Serial.println(")*");
Serial.flush();
}
break;
}
*s = 0;
*e = 0;
}
}
}
int hexToChar(char c)
{
if (c >= '0' && c <= '9')
return c - '0';
if (c >= 'A' && c <= 'F')
return c - 'A' + 10;
if (c >= 'a' && c <= 'f')
return c - 'a' + 10;
return -1;
}

View File

@ -0,0 +1,78 @@
/*
Inkplate_VariPass_Graphs example for e-radionica Inkplate6
For this example you will need a micro USB cable, Inkplate6, and an available WiFi connection.
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
This example will show you how you can use the API on the VariPass website to download and display
a sensor graph on the e-paper display.
VariPass is a website which allows you to host various online "variables" which you can write to
and read from using the VariPass API. This allows you to store sensor logs and later retrieve them
for graphing, analysis, etc.
This example uses an already public variable as an example. The graph is fed every minute with data
from Thorinair's (https://github.com/Thorinair/) geiger counter, so each startup of the Inkplate will
display updated values.
To learn more about VariPass and how you can use it for your own projects, please visit: https://varipass.org/
If you want to easily integrate the read/write functionality in your project, use the official library:
https://github.com/Thorinair/VariPass-for-ESP8266-ESP32
Want to learn more about Inkplate? Visit www.inkplate.io
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
23 July 2020 by e-radionica.com
*/
#include "Inkplate.h" //Include Inkplate library to the sketch
#include "WiFi.h" //Include library for WiFi
Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1 Bit mode (BW)
const char *ssid = "YourWiFiSSID"; // Your WiFi SSID
const char *password = "YourPass"; // Your WiFi password
void setup()
{
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); // Clear frame buffer of display
display.display(); // Put clear image on display
display.print("Connecting to WiFi...");
display.partialUpdate();
// Connect to the WiFi network.
WiFi.mode(WIFI_MODE_STA);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
display.print(".");
display.partialUpdate();
}
display.println("\nWiFi OK! Downloading...");
display.partialUpdate();
// Use a HTTP get request to fetch the graph from VariPass.
// The API expects a few parameters in the URL to allow it to work.
// action - Should be set to "sgraph" or "graph" in order to generate a compatible image.
// id - ID of the variable. It is enough to specify just the ID if the variable is public,
// but a "key" parameter should also be specified if not.
// width - Width of the generated graph, here set to half the Inkplate's width.
// height - Height of the generated graph, here set to half the Inkplate's height.
// eink - Should be set to true to generate a BW 1 bit bitmap better suitable for Inkplate.
// For more detailed explanation and more parameters, please visit the docs page: https://varipass.org/docs/
if (!display.drawBitmapFromWeb("https://api.varipass.org/?action=sgraph&id=kbg3eQfA&width=400&height=300&eink=true",
200, 150))
{
display.println("Image open error");
display.partialUpdate();
}
display.partialUpdate();
WiFi.mode(WIFI_OFF);
}
void loop()
{
// Nothing...
}

View File

@ -21,56 +21,56 @@
//---------- CHANGE HERE -------------:
//Adjust your time zone, 2 means UTC+2
// Adjust your time zone, 2 means UTC+2
int timeZone = 2;
//Put in your ssid and password
// Put in your ssid and password
char *ssid = "";
char *pass = "";
//OPTIONAL:
//change to a different currency
// OPTIONAL:
// change to a different currency
char *currency = "bitcoin";
char *currencyAbbr = "BTC";
//You can find your currency id here:
//https://api.coingecko.com/api/v3/coins
// You can find your currency id here:
// https://api.coingecko.com/api/v3/coins
//If it loads weirdly you can search the JSON using ctrl/command+f for
//your crypto by name and then find it's id next to it's name and copy those above
// If it loads weirdly you can search the JSON using ctrl/command+f for
// your crypto by name and then find it's id next to it's name and copy those above
//----------------------------------
//Include Inkplate library to the sketch
// Include Inkplate library to the sketch
#include "Inkplate.h"
//Include fonts used
// Include fonts used
#include "Fonts/Roboto_Light_160.h"
#include "Fonts/Roboto_Light_40.h"
#include "Fonts/Roboto_Light_36.h"
#include "Fonts/Roboto_Light_40.h"
//Our networking functions, declared in Network.cpp
// Our networking functions, declared in Network.cpp
#include "Network.h"
//create object with all networking functions
// create object with all networking functions
Network network;
//create display object
// create display object
Inkplate display(INKPLATE_3BIT);
//Delay between API calls in miliseconds
// Delay between API calls in miliseconds
#define DELAY_MS 5000
//Variable for counting partial refreshes
// Variable for counting partial refreshes
long refreshes = 0;
//Constant to determine when to full update
// Constant to determine when to full update
const int fullRefresh = 20;
//Used for storing raw price values
// Used for storing raw price values
double data[64];
//Used to simplify UI design
// Used to simplify UI design
struct textElement
{
int x;
@ -80,7 +80,7 @@ struct textElement
char align;
};
//Variables for storing all displayed data as char arrays
// Variables for storing all displayed data as char arrays
char date[64];
char fromToDate[64];
@ -91,7 +91,7 @@ char current[16];
char minimum[16];
char maximum[16];
//All months in a year, for finding current date
// All months in a year, for finding current date
char *months[] = {
"Jan"
"Feb",
@ -107,7 +107,7 @@ char *months[] = {
"Dec",
};
//Out UI elements data
// Out UI elements data
textElement elements[] = {
{50, 130, &Roboto_Light_160, currencyAbbr, 0},
{390, 80, &Roboto_Light_40, date, 0},
@ -137,17 +137,17 @@ void drawAll();
void setup()
{
//Begin serial communitcation, sed for debugging
// Begin serial communitcation, sed for debugging
Serial.begin(115200);
//Initial display settings
// Initial display settings
display.begin();
display.clean();
display.clearDisplay();
display.setTextWrap(false);
display.setTextColor(0, 7);
//Welcome screen
// Welcome screen
display.setCursor(70, 230);
display.setTextSize(2);
display.println(F("Welcome to Inkplate 6 cryptocurrency tracker example!"));
@ -157,13 +157,13 @@ void setup()
delay(5000);
//Our begin function
// Our begin function
network.begin();
}
void loop()
{
//Do a new network request every fullRefresh times, defined above
// Do a new network request every fullRefresh times, defined above
if (refreshes % fullRefresh == 0)
while (!network.getData(data))
{
@ -171,21 +171,21 @@ void loop()
delay(1000);
}
//Our main drawing function
// Our main drawing function
drawAll();
//Go to sleep before checking again
// Go to sleep before checking again
esp_sleep_enable_timer_wakeup(1000L * DELAY_MS);
(void)esp_light_sleep_start();
//Increment refresh count
// Increment refresh count
++refreshes;
}
//Function to draw our graph
// Function to draw our graph
void drawGraph()
{
//Edge Coordinates
// Edge Coordinates
int x1 = 10;
int y1 = 535;
@ -194,11 +194,11 @@ void drawGraph()
int textMargin = 68;
//Set min to a very high value, and max to very low, so that any real world data changes it
// Set min to a very high value, and max to very low, so that any real world data changes it
double minData = 1e9F;
double maxData = -1e9F;
//Find min and max in data
// Find min and max in data
for (int i = 0; i < 31; ++i)
{
minData = min(minData, data[i]);
@ -207,7 +207,7 @@ void drawGraph()
double span = max(0.3D, (double)abs(maxData - minData));
//Copy current, min and max data to char arrays to be displayed
// Copy current, min and max data to char arrays to be displayed
dtostrf(data[30], 8, 2, current);
strcat(current, "$");
dtostrf(minData, 8, 2, minimum);
@ -215,7 +215,7 @@ void drawGraph()
dtostrf(maxData, 8, 2, maximum);
strcat(maximum, "$");
//Temporary buffer
// Temporary buffer
char temp[64];
for (int i = 0; i < 4; ++i)
@ -224,11 +224,11 @@ void drawGraph()
strncpy(prices + 16 * (3 - i), temp, 16);
}
//Find current day in a month
// Find current day in a month
int day;
sscanf(date + 3, "%d", &day);
//Find current month
// Find current month
int month = 0;
for (int i = 0; i < 12; ++i)
{
@ -236,7 +236,7 @@ void drawGraph()
month = ((i + 2) % 12 ? i + 2 : 12);
}
//Find days to display underneath the graph
// Find days to display underneath the graph
for (int i = 0; i < 5; ++i)
{
itoa(((day - i * 7) % 31 + 31) % 31, temp, 10);
@ -248,59 +248,56 @@ void drawGraph()
strcat(dates + 8 * (4 - i), ".");
}
//Used for drawing lines
// Used for drawing lines
int prev_x = -1;
int prev_y = -1;
//Draw gradients
// Draw gradients
for (int i = 0; i < 31; ++i)
{
//Calculate heights and current x value for a data point
// Calculate heights and current x value for a data point
int tx = x1 + i * (x2 - x1 - textMargin) / 31;
double v = data[i];
int h = (int)((double)(v - minData) * (double)abs(y1 - y2) / span);
int ty = y1 - h;
//If i is not 0, hence prev x and y exist so draw gradients under them
// If i is not 0, hence prev x and y exist so draw gradients under them
if (i)
{
//Rise over run for one pixel
// Rise over run for one pixel
double dy = (double)(ty - prev_y) / (double)((x2 - x1 - textMargin) / 31);
//Draw a gradient line from every pixel to bottom line in graph line
// Draw a gradient line from every pixel to bottom line in graph line
for (int j = 0; j < (x2 - x1 - textMargin) / 31 + 1; ++j)
display.drawGradientLine(prev_x + j,
(int)round((double)prev_y + dy * (double)j),
prev_x + j,
y1, 3, 7);
display.drawGradientLine(prev_x + j, (int)round((double)prev_y + dy * (double)j), prev_x + j, y1, 3, 7);
}
//Set previous x and y
// Set previous x and y
prev_x = tx;
prev_y = ty;
}
//After drawing gradients, draw lines
// After drawing gradients, draw lines
for (int i = 0; i < 31; ++i)
{
//Calculate heights and current x value for a data point
// Calculate heights and current x value for a data point
int tx = x1 + i * (x2 - x1 - textMargin) / 31;
double v = data[i];
int h = (int)((double)(v - minData) * (double)abs(y1 - y2) / span);
int ty = y1 - h;
//If i is not 0, hence prev x and y exsist so draw lines
// If i is not 0, hence prev x and y exsist so draw lines
if (i)
{
display.drawThickLine(prev_x, prev_y, tx, ty, 0, 5.0);
}
//Set previous x and y
// Set previous x and y
prev_x = tx;
prev_y = ty;
}
//Draw grid
// Draw grid
for (int i = 0; i < 4; ++i)
display.drawFastHLine(x1, y2 + i * (y1 - y2) / 4, x2 - x1, 4);
for (int i = 0; i < 5; ++i)
@ -310,40 +307,41 @@ void drawGraph()
display.drawThickLine(x1, y1, x2, y1, 0, 3);
}
//Our main drawing function
// Our main drawing function
void drawAll()
{ //Do a full refresh every fullRefresh times, defined above
{ // Do a full refresh every fullRefresh times, defined above
if (refreshes % fullRefresh == 0)
{
//Initial screen clear
// Initial screen clear
display.clearDisplay();
//Save current date string, more about it in Network.cpp
// Save current date string, more about it in Network.cpp
network.getTime(date);
//Find current day from string
// Find current day from string
int day;
sscanf(date + 3, "%d", &day);
//Find what month is it numericly and display it
// Find what month is it numericly and display it
for (int i = 0; i < 12; ++i)
{
if (strncmp(months[i], date, 3) == 0)
sprintf(fromToDate, "%d.%d. to %d.%d.", day, ((i + 1) % 12 ? i + 1 : 12), day, ((i + 2) % 12 ? i + 2 : 12));
sprintf(fromToDate, "%d.%d. to %d.%d.", day, ((i + 1) % 12 ? i + 1 : 12), day,
((i + 2) % 12 ? i + 2 : 12));
}
//Draw graph
// Draw graph
drawGraph();
//Draw our UI elements
// Draw our UI elements
for (int i = 0; i < sizeof(elements) / sizeof(elements[0]); ++i)
{
//Text settings
// Text settings
display.setTextColor(0, 7);
display.setFont(elements[i].font);
display.setTextSize(1);
//0 is aligned by left bottom corner, 1 by right
// 0 is aligned by left bottom corner, 1 by right
if (elements[i].align == 0)
display.setCursor((int)(elements[i].x * 0.96), (int)(elements[i].y));
else if (elements[i].align == 1)
@ -351,47 +349,43 @@ void drawAll()
int16_t x, y;
uint16_t w, h;
//Get hot much the textx offsets pointer and draw it that much more left
display.getTextBounds(
elements[i].text,
0,
0,
&x, &y, &w, &h);
// Get hot much the textx offsets pointer and draw it that much more left
display.getTextBounds(elements[i].text, 0, 0, &x, &y, &w, &h);
display.setCursor((int)(elements[i].x * 0.96) - w, (int)(elements[i].y));
}
//Print out text to above set cursor location
// Print out text to above set cursor location
display.print(elements[i].text);
}
//Display all
// Display all
display.display();
}
else
{
//Just draw time
// Just draw time
int i = 1;
//Initial screen clear
// Initial screen clear
display.clearDisplay();
//Save current date string, more about it in Network.cpp
// Save current date string, more about it in Network.cpp
network.getTime(date);
//Text settings
// Text settings
display.setTextColor(0, 7);
display.setFont(elements[i].font);
display.setTextSize(1);
//0 is aligned by left bottom corner, 1 by right
// 0 is aligned by left bottom corner, 1 by right
if (elements[i].align == 0)
display.setCursor((int)(elements[i].x * 0.96), (int)(elements[i].y));
//Print out text to above set cursor location
// Print out text to above set cursor location
display.print(date);
//Just update time
// Just update time
display.partialUpdate();
}
}

Some files were not shown because too many files have changed in this diff Show More