Added default info header.
This commit is contained in:
parent
7a40b54df1
commit
cb57141976
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
3_Inkplate_Battery_Voltage_And_Temperature example for e-radionica Inkplate 6
|
||||
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:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
2_Inkplate_Low_Power example for e-radionica.com Inkplate 6
|
||||
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:
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
/*
|
||||
8_Inkplate_MCP23017 example for e-radionica.com Inkplate 6
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
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/
|
||||
|
@ -25,14 +26,18 @@
|
|||
|
||||
#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)
|
||||
#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
|
||||
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()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
6_Inkplate_SD_TXT example for e-radionica.com Inkplate 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.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
5_Inkplate_SD_BMP example for e-radionica Inkplate6
|
||||
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.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
4_Inkplate_Touchpads example for e-radionica.com Inkplate 6
|
||||
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:
|
||||
|
@ -72,7 +72,8 @@ void displayNumber()
|
|||
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
|
||||
{ // 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;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
/*
|
||||
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
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
10_Web_BMP_pictures example for e-radionica Inkplate6
|
||||
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:
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
/*
|
||||
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/
|
||||
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.
|
||||
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!
|
||||
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
|
||||
#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"
|
||||
|
@ -49,7 +49,9 @@ void setup()
|
|||
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.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();
|
||||
}
|
||||
|
@ -70,7 +72,8 @@ void handleRoot()
|
|||
}
|
||||
|
||||
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
|
||||
{ // 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();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
1_Inkplate_WiFi_HTTP example for e-radionica.com Inkplate 6
|
||||
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:
|
||||
|
@ -22,8 +22,7 @@
|
|||
#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)
|
||||
Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1 Bit mode (BW)
|
||||
|
||||
void setup()
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
7_Inkplate_easyC example for e-radionica.com Inkplate 6
|
||||
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
|
||||
|
@ -18,12 +18,13 @@
|
|||
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
|
||||
#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 (BW)
|
||||
Adafruit_BME680 bme; //Create an object on Adafruit BME680 library
|
||||
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
|
||||
|
@ -81,7 +82,8 @@ void loop()
|
|||
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.
|
||||
{ // If display has been partially updated more than 20 times, do a full refresh, otherwise, perform a partial
|
||||
// update.
|
||||
display.display();
|
||||
n = 0;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
4_Basic_custom_font example for e-radionica.com Inkplate 6
|
||||
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:
|
||||
|
@ -9,19 +9,19 @@
|
|||
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!
|
||||
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 "DSEG14Classic_Regular20pt7b.h" //Include second font
|
||||
#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 (BW)
|
||||
|
||||
void setup()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
3_Basic_partial_update example for e-radionica Inkplate 6
|
||||
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:
|
||||
|
@ -7,8 +7,8 @@
|
|||
|
||||
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.
|
||||
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/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
1_Basic_monochorme example for e-radionica.com Inkplate 6
|
||||
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:
|
||||
|
@ -16,7 +16,7 @@
|
|||
|
||||
#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"
|
||||
// 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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
2_Basic_gray example for e-radionica.com Inkplate 6
|
||||
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:
|
||||
|
@ -21,11 +21,11 @@
|
|||
#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
|
||||
// "2-Inkplate_basic_BW"
|
||||
// "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 "3-Inkplate-basic_partial_update"
|
||||
//Want to refresh faster? Use partial update! Find example in "Inkplate-basic_partial_update"
|
||||
|
||||
void setup()
|
||||
{
|
||||
|
|
|
@ -1,7 +1,19 @@
|
|||
/** Example "Game of Life" program for the InkPlate 6 by Chris Knight
|
||||
* https://github.com/claud9999
|
||||
/*
|
||||
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);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
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:
|
||||
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
|
||||
|
@ -12,7 +12,7 @@
|
|||
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/
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
/*
|
||||
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
|
||||
|
|
|
@ -1,17 +1,38 @@
|
|||
/*
|
||||
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();
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
3-Inkplate_VariPass_Graphs example for e-radionica Inkplate6
|
||||
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:
|
||||
|
@ -61,7 +61,8 @@ void setup()
|
|||
// 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))
|
||||
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();
|
||||
|
|
|
@ -1,7 +1,23 @@
|
|||
/*
|
||||
Network.cpp
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "Network.h"
|
||||
|
||||
#include <WiFi.h>
|
||||
#include <HTTPClient.h>
|
||||
#include <WiFi.h>
|
||||
#include <WiFiClientSecure.h>
|
||||
|
||||
#include "Inkplate.h"
|
||||
|
|
|
@ -1,7 +1,23 @@
|
|||
/*
|
||||
Network.h
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "Arduino.h"
|
||||
|
||||
#include <WiFi.h>
|
||||
#include <HTTPClient.h>
|
||||
#include <WiFi.h>
|
||||
#include <WiFiClientSecure.h>
|
||||
|
||||
// To get timeZone from main file
|
||||
|
|
|
@ -1,9 +1,25 @@
|
|||
/*
|
||||
Network.cpp
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
// Network.cpp contains various functions and classes that enable Weather station
|
||||
// They have been declared in seperate file to increase readability
|
||||
#include "Network.h"
|
||||
|
||||
#include <WiFi.h>
|
||||
#include <HTTPClient.h>
|
||||
#include <WiFi.h>
|
||||
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
|
@ -12,13 +28,7 @@ StaticJsonDocument<6000> doc;
|
|||
|
||||
// Declared week days
|
||||
char weekDays[8][8] = {
|
||||
"Mon",
|
||||
"Tue",
|
||||
"Wed",
|
||||
"Thr",
|
||||
"Fri",
|
||||
"Sat",
|
||||
"Sun",
|
||||
"Mon", "Tue", "Wed", "Thr", "Fri", "Sat", "Sun",
|
||||
};
|
||||
|
||||
void Network::begin(char *city)
|
||||
|
@ -87,7 +97,9 @@ void formatWind(char *str, float wind)
|
|||
dtostrf(wind, 2, 0, str);
|
||||
}
|
||||
|
||||
void Network::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 Network::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)
|
||||
{
|
||||
// If not connected to wifi reconnect wifi
|
||||
if (WiFi.status() != WL_CONNECTED)
|
||||
|
|
|
@ -1,9 +1,23 @@
|
|||
/*
|
||||
Network.h
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "Arduino.h"
|
||||
|
||||
#include <WiFi.h>
|
||||
|
||||
#include <HTTPClient.h>
|
||||
|
||||
#include <WiFi.h>
|
||||
#include <WiFiClientSecure.h>
|
||||
|
||||
// To get timeZone from main file
|
||||
|
@ -24,7 +38,9 @@ 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 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()
|
||||
|
|
|
@ -1,7 +1,23 @@
|
|||
/*
|
||||
Network.cpp
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "Network.h"
|
||||
|
||||
#include <WiFi.h>
|
||||
#include <HTTPClient.h>
|
||||
#include <WiFi.h>
|
||||
#include <WiFiClientSecure.h>
|
||||
|
||||
void Network::begin()
|
||||
|
|
|
@ -1,7 +1,23 @@
|
|||
/*
|
||||
Network.h
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "Arduino.h"
|
||||
|
||||
#include <WiFi.h>
|
||||
#include <HTTPClient.h>
|
||||
#include <WiFi.h>
|
||||
#include <WiFiClientSecure.h>
|
||||
|
||||
// To get timeZone from main file
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
Network.cpp
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
// Network.cpp contains various functions and classes that enable Weather station
|
||||
// They have been declared in seperate file to increase readability
|
||||
#include "Network.h"
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
Network.h
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "Arduino.h"
|
||||
|
||||
#include "Inkplate.h"
|
||||
|
@ -32,7 +48,9 @@ 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);
|
||||
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
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
/*
|
||||
Spotify_api_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 project shows you how Inkplate 6 can be used to display
|
||||
your spotify real time activity.
|
||||
|
||||
To get this working, see https://inkplate.readthedocs.io/en/latest/examples.html#spotify-api
|
||||
It is quite complicated, but were sure you'll get it working!
|
||||
|
||||
Want to learn more about Inkplate? Visit www.inkplate.io
|
||||
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
|
||||
3 August 2020 by e-radionica.com
|
||||
*/
|
||||
|
||||
#include "Inkplate.h"
|
||||
|
||||
#include <ArduinoJson.h>
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
generatedUI.cpp
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "Arduino.h"
|
||||
#include "Fonts/Roboto_Condensed_24.h"
|
||||
#include "Fonts/Roboto_Condensed_32.h"
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
Inkplate.cpp
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "Inkplate.h"
|
||||
|
||||
#define CL 0x01
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
Inkplate.h
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#ifndef __INKPLATE_H__
|
||||
#define __INKPLATE_H__
|
||||
|
||||
|
|
16
src/SdFat.h
16
src/SdFat.h
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
SdFat.h
|
||||
Inkplate 6 Arduino library
|
||||
Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "libs/SdFat/SdFat.h"
|
||||
|
||||
// backwards compatibility file
|
|
@ -1 +1,19 @@
|
|||
/*
|
||||
Esp.cpp
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "Esp.h"
|
||||
|
||||
// Maybe add something in the future
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
Esp.h
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#ifndef __ESP_H__
|
||||
#define __ESP_H__
|
||||
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
Graphics.cpp
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "Graphics.h"
|
||||
|
||||
#ifndef min
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
Graphics.h
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#ifndef __GRAPHICS_H__
|
||||
#define __GRAPHICS_H__
|
||||
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
Image.cpp
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "Image.h"
|
||||
|
||||
#include "../libs/TJpeg/TJpg_Decoder.h"
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
Image.h
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#ifndef __IMAGE_H__
|
||||
#define __IMAGE_H__
|
||||
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
ImageBMP.cpp
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "Image.h"
|
||||
|
||||
bool Image::legalBmp(bitmapHeader *bmpHeader)
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
ImageDither.cpp
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "Image.h"
|
||||
|
||||
uint8_t Image::ditherGetPixelBmp(uint8_t px, int i, int w, bool paletted)
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
ImageJPEG.cpp
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "Image.h"
|
||||
|
||||
#include "../libs/TJpeg/TJpg_Decoder.h"
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
ImagePNG.cpp
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "Image.h"
|
||||
|
||||
#include "../libs/pngle/pngle.h"
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
Mcp.cpp
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "Mcp.h"
|
||||
|
||||
// LOW LEVEL:
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
Mcp.h
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#ifndef __MCP_H__
|
||||
#define __MCP_H__
|
||||
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
NetworkClient.cpp
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "NetworkClient.h"
|
||||
|
||||
bool NetworkClient::joinAP(const char *ssid, const char *pass)
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
NetworkClient.h
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#ifndef __NETWORKCLIENT_H__
|
||||
#define __NETWORKCLIENT_H__
|
||||
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
Shapes.cpp
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "Shapes.h"
|
||||
|
||||
#ifndef min
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
Shapes.h
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#ifndef __SHAPES_H__
|
||||
#define __SHAPES_H__
|
||||
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
ShapesPolygon.cpp
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "Shapes.h"
|
||||
|
||||
void Shapes::initedgeTable()
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
System.cpp
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "System.h"
|
||||
|
||||
SPIClass spi2(HSPI);
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
System.h
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#ifndef __SYSTEM_H__
|
||||
#define __SYSTEM_H__
|
||||
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
defines.h
|
||||
Inkplate 6 Arduino library
|
||||
David Zovko, Borna Biro, Denis Vajak, Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#ifndef __DEFINES_H__
|
||||
#define __DEFINES_H__
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*
|
||||
bitmaps.ino
|
||||
Inkplate 6 Arduino library
|
||||
Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
|
||||
#include "Inkplate.h"
|
||||
#include "SdFat.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
/*
|
||||
drawImage.ino
|
||||
Inkplate 6 Arduino library
|
||||
Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
|
||||
#include "Inkplate.h"
|
||||
#include "SdFat.h"
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
#include "Inkplate.h"
|
|
@ -1,19 +0,0 @@
|
|||
#include "Inkplate.h"
|
||||
#include "generatedUI.h"
|
||||
|
||||
Inkplate display(INKPLATE_3BIT);
|
||||
|
||||
void setup()
|
||||
{
|
||||
display.begin();
|
||||
mainDraw();
|
||||
int x[] = {600, 700, 800, 700, 600}, y[] = {200, 100, 400, 500, 300};
|
||||
int x2[] = {600, 700, 800, 700, 600}, y2[] = {400, 300, 600, 600, 500};
|
||||
display.drawPolygon(x, y, 5, 0);
|
||||
display.fillPolygon(x2, y2, 5, 0);
|
||||
display.display();
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
}
|
|
@ -1,300 +0,0 @@
|
|||
#include "Arduino.h"
|
||||
#include "Inkplate.h"
|
||||
#include "../res/Fonts/FreeSansBold24pt7b.h"
|
||||
|
||||
extern Inkplate display;
|
||||
|
||||
String text0_content = "Hello there!";
|
||||
int text0_cursor_x = 15;
|
||||
int text0_cursor_y = 33;
|
||||
const GFXfont *text0_font = &FreeSansBold24pt7b;
|
||||
|
||||
int pixel0_x = 17;
|
||||
int pixel0_y = 56;
|
||||
int pixel0_color = 0;
|
||||
|
||||
int line0_start_x = 17;
|
||||
int line0_start_y = 75;
|
||||
int line0_end_x = 171;
|
||||
int line0_end_y = 72;
|
||||
int line0_color = 0;
|
||||
int line0_thickness = 1;
|
||||
int line0_gradient = 0;
|
||||
|
||||
int rect0_a_x = 18;
|
||||
int rect0_a_y = 91;
|
||||
int rect0_b_x = 170;
|
||||
int rect0_b_y = 136;
|
||||
int rect0_fill = -1;
|
||||
int rect0_radius = -1;
|
||||
int rect0_color = 0;
|
||||
|
||||
int rect1_a_x = 20;
|
||||
int rect1_a_y = 153;
|
||||
int rect1_b_x = 171;
|
||||
int rect1_b_y = 201;
|
||||
int rect1_fill = -1;
|
||||
int rect1_radius = 15;
|
||||
int rect1_color = 0;
|
||||
|
||||
int rect2_a_x = 22;
|
||||
int rect2_a_y = 220;
|
||||
int rect2_b_x = 174;
|
||||
int rect2_b_y = 269;
|
||||
int rect2_fill = 1;
|
||||
int rect2_radius = -1;
|
||||
int rect2_color = 3;
|
||||
|
||||
int rect3_a_x = 22;
|
||||
int rect3_a_y = 290;
|
||||
int rect3_b_x = 175;
|
||||
int rect3_b_y = 336;
|
||||
int rect3_fill = 1;
|
||||
int rect3_radius = 20;
|
||||
int rect3_color = 2;
|
||||
|
||||
int line1_start_x = 197;
|
||||
int line1_start_y = 10;
|
||||
int line1_end_x = 200;
|
||||
int line1_end_y = 334;
|
||||
int line1_color = 4;
|
||||
int line1_thickness = 5;
|
||||
int line1_gradient = 0;
|
||||
|
||||
int line2_start_x = 222;
|
||||
int line2_start_y = 12;
|
||||
int line2_end_x = 228;
|
||||
int line2_end_y = 410;
|
||||
int line2_color = 0;
|
||||
int line2_thickness = 10;
|
||||
int line2_gradient = 7;
|
||||
|
||||
int circle0_center_x = 110;
|
||||
int circle0_center_y = 455;
|
||||
int circle0_fill = -1;
|
||||
int circle0_radius = 100;
|
||||
int circle0_color = 0;
|
||||
|
||||
int circle1_center_x = 109;
|
||||
int circle1_center_y = 454;
|
||||
int circle1_fill = 1;
|
||||
int circle1_radius = 50;
|
||||
int circle1_color = 3;
|
||||
|
||||
int triangle0_a_x = 226;
|
||||
int triangle0_a_y = 424;
|
||||
int triangle0_b_x = 361;
|
||||
int triangle0_b_y = 491;
|
||||
int triangle0_c_x = 228;
|
||||
int triangle0_c_y = 581;
|
||||
int triangle0_fill = 1;
|
||||
int triangle0_radius = -1;
|
||||
int triangle0_color = 4;
|
||||
|
||||
int triangle1_a_x = 257;
|
||||
int triangle1_a_y = 409;
|
||||
int triangle1_b_x = 374;
|
||||
int triangle1_b_y = 479;
|
||||
int triangle1_c_x = 252;
|
||||
int triangle1_c_y = 194;
|
||||
int triangle1_fill = -1;
|
||||
int triangle1_radius = -1;
|
||||
int triangle1_color = 0;
|
||||
|
||||
int digital_clock0_h = 9;
|
||||
int digital_clock0_m = 41;
|
||||
int digital_clock0_location_x = 248;
|
||||
int digital_clock0_location_y = 12;
|
||||
int digital_clock0_size = 64;
|
||||
int digital_clock0_bitmask[] = {119, 48, 93, 121, 58, 107, 111, 49, 127, 59};
|
||||
int digital_clock0_triangleX[] = {83, 101, 108, 101, 108, 277, 101, 108, 277, 257, 277, 108, 257, 277, 286, 76, 60, 98, 60, 98, 80, 80, 39, 60, 80, 39, 55, 31, 55, 73, 31, 73, 52, 31, 9, 52, 9, 52, 20, 61, 86, 80, 86, 80, 233, 233, 227, 80, 233, 227, 252, 260, 292, 305, 305, 260, 240, 305, 281, 240, 240, 281, 260, 259, 234, 276, 234, 276, 256, 256, 214, 234, 214, 256, 237, 38, 27, 60, 38, 60, 207, 207, 38, 212, 212, 207, 230};
|
||||
int digital_clock0_triangleY[] = {30, 13, 60, 13, 60, 14, 13, 60, 14, 57, 14, 60, 57, 14, 29, 36, 47, 61, 47, 61, 198, 198, 201, 47, 198, 201, 219, 252, 232, 253, 252, 253, 390, 252, 406, 390, 406, 390, 416, 227, 202, 249, 202, 249, 203, 203, 247, 249, 203, 247, 224, 60, 35, 49, 49, 60, 200, 50, 201, 200, 200, 201, 220, 231, 252, 252, 252, 252, 403, 403, 390, 252, 390, 403, 415, 439, 424, 392, 439, 392, 394, 394, 439, 439, 439, 394, 424};
|
||||
int digital_clock0_maxX = 310;
|
||||
int digital_clock0_maxY = 440;
|
||||
|
||||
int widget1_h = 9;
|
||||
int widget1_m = 41;
|
||||
int widget1_center_x = 290;
|
||||
int widget1_center_y = 126;
|
||||
int widget1_size = 64;
|
||||
int widget1_r0 = (double)widget1_size / 2 * 0.55;
|
||||
int widget1_r1 = (double)widget1_size / 2 * 0.65;
|
||||
int widget1_r2 = (double)widget1_size / 2 * 0.9;
|
||||
int widget1_r3 = (double)widget1_size / 2 * 1.0;
|
||||
|
||||
int widget2_h = 9;
|
||||
int widget2_m = 41;
|
||||
int widget2_center_x = 386;
|
||||
int widget2_center_y = 231;
|
||||
int widget2_size = 151;
|
||||
int widget2_r0 = (double)widget2_size / 2 * 0.55;
|
||||
int widget2_r1 = (double)widget2_size / 2 * 0.65;
|
||||
int widget2_r2 = (double)widget2_size / 2 * 0.9;
|
||||
int widget2_r3 = (double)widget2_size / 2 * 1.0;
|
||||
|
||||
void mainDraw()
|
||||
{
|
||||
display.setFont(text0_font);
|
||||
display.setTextColor(0, 7);
|
||||
display.setTextSize(1);
|
||||
display.setCursor(text0_cursor_x, text0_cursor_y);
|
||||
display.print(text0_content);
|
||||
|
||||
display.drawPixel(pixel0_x, pixel0_y, pixel0_color);
|
||||
|
||||
if (line0_gradient <= line0_color && line0_thickness == 1)
|
||||
display.drawLine(line0_start_x, line0_start_y, line0_end_x, line0_end_y, line0_color);
|
||||
else if (line0_gradient <= line0_color && line0_thickness != 1)
|
||||
display.drawThickLine(line0_start_x, line0_start_y, line0_end_x, line0_end_y, line0_color, line0_thickness);
|
||||
else if (line0_gradient > line0_color && line0_thickness == 1)
|
||||
display.drawGradientLine(line0_start_x, line0_start_y, line0_end_x, line0_end_y, line0_color, line0_gradient, 1);
|
||||
else if (line0_gradient > line0_color && line0_thickness != 1)
|
||||
display.drawGradientLine(line0_start_x, line0_start_y, line0_end_x, line0_end_y, line0_color, line0_gradient, line0_thickness);
|
||||
|
||||
if (rect0_radius != -1 && rect0_fill != -1)
|
||||
display.fillRoundRect(rect0_a_x, rect0_a_y, rect0_b_x - rect0_a_x, rect0_b_y - rect0_a_y, rect0_radius, rect0_color);
|
||||
else if (rect0_radius != -1 && rect0_fill == -1)
|
||||
display.drawRoundRect(rect0_a_x, rect0_a_y, rect0_b_x - rect0_a_x, rect0_b_y - rect0_a_y, rect0_radius, rect0_color);
|
||||
else if (rect0_radius == -1 && rect0_fill != -1)
|
||||
display.fillRect(rect0_a_x, rect0_a_y, rect0_b_x - rect0_a_x, rect0_b_y - rect0_a_y, rect0_color);
|
||||
else if (rect0_radius == -1 && rect0_fill == -1)
|
||||
display.drawRect(rect0_a_x, rect0_a_y, rect0_b_x - rect0_a_x, rect0_b_y - rect0_a_y, rect0_color);
|
||||
|
||||
if (rect1_radius != -1 && rect1_fill != -1)
|
||||
display.fillRoundRect(rect1_a_x, rect1_a_y, rect1_b_x - rect1_a_x, rect1_b_y - rect1_a_y, rect1_radius, rect1_color);
|
||||
else if (rect1_radius != -1 && rect1_fill == -1)
|
||||
display.drawRoundRect(rect1_a_x, rect1_a_y, rect1_b_x - rect1_a_x, rect1_b_y - rect1_a_y, rect1_radius, rect1_color);
|
||||
else if (rect1_radius == -1 && rect1_fill != -1)
|
||||
display.fillRect(rect1_a_x, rect1_a_y, rect1_b_x - rect1_a_x, rect1_b_y - rect1_a_y, rect1_color);
|
||||
else if (rect1_radius == -1 && rect1_fill == -1)
|
||||
display.drawRect(rect1_a_x, rect1_a_y, rect1_b_x - rect1_a_x, rect1_b_y - rect1_a_y, rect1_color);
|
||||
|
||||
if (rect2_radius != -1 && rect2_fill != -1)
|
||||
display.fillRoundRect(rect2_a_x, rect2_a_y, rect2_b_x - rect2_a_x, rect2_b_y - rect2_a_y, rect2_radius, rect2_color);
|
||||
else if (rect2_radius != -1 && rect2_fill == -1)
|
||||
display.drawRoundRect(rect2_a_x, rect2_a_y, rect2_b_x - rect2_a_x, rect2_b_y - rect2_a_y, rect2_radius, rect2_color);
|
||||
else if (rect2_radius == -1 && rect2_fill != -1)
|
||||
display.fillRect(rect2_a_x, rect2_a_y, rect2_b_x - rect2_a_x, rect2_b_y - rect2_a_y, rect2_color);
|
||||
else if (rect2_radius == -1 && rect2_fill == -1)
|
||||
display.drawRect(rect2_a_x, rect2_a_y, rect2_b_x - rect2_a_x, rect2_b_y - rect2_a_y, rect2_color);
|
||||
|
||||
if (rect3_radius != -1 && rect3_fill != -1)
|
||||
display.fillRoundRect(rect3_a_x, rect3_a_y, rect3_b_x - rect3_a_x, rect3_b_y - rect3_a_y, rect3_radius, rect3_color);
|
||||
else if (rect3_radius != -1 && rect3_fill == -1)
|
||||
display.drawRoundRect(rect3_a_x, rect3_a_y, rect3_b_x - rect3_a_x, rect3_b_y - rect3_a_y, rect3_radius, rect3_color);
|
||||
else if (rect3_radius == -1 && rect3_fill != -1)
|
||||
display.fillRect(rect3_a_x, rect3_a_y, rect3_b_x - rect3_a_x, rect3_b_y - rect3_a_y, rect3_color);
|
||||
else if (rect3_radius == -1 && rect3_fill == -1)
|
||||
display.drawRect(rect3_a_x, rect3_a_y, rect3_b_x - rect3_a_x, rect3_b_y - rect3_a_y, rect3_color);
|
||||
|
||||
if (line1_gradient <= line1_color && line1_thickness == 1)
|
||||
display.drawLine(line1_start_x, line1_start_y, line1_end_x, line1_end_y, line1_color);
|
||||
else if (line1_gradient <= line1_color && line1_thickness != 1)
|
||||
display.drawThickLine(line1_start_x, line1_start_y, line1_end_x, line1_end_y, line1_color, line1_thickness);
|
||||
else if (line1_gradient > line1_color && line1_thickness == 1)
|
||||
display.drawGradientLine(line1_start_x, line1_start_y, line1_end_x, line1_end_y, line1_color, line1_gradient, 1);
|
||||
else if (line1_gradient > line1_color && line1_thickness != 1)
|
||||
display.drawGradientLine(line1_start_x, line1_start_y, line1_end_x, line1_end_y, line1_color, line1_gradient, line1_thickness);
|
||||
|
||||
if (line2_gradient <= line2_color && line2_thickness == 1)
|
||||
display.drawLine(line2_start_x, line2_start_y, line2_end_x, line2_end_y, line2_color);
|
||||
else if (line2_gradient <= line2_color && line2_thickness != 1)
|
||||
display.drawThickLine(line2_start_x, line2_start_y, line2_end_x, line2_end_y, line2_color, line2_thickness);
|
||||
else if (line2_gradient > line2_color && line2_thickness == 1)
|
||||
display.drawGradientLine(line2_start_x, line2_start_y, line2_end_x, line2_end_y, line2_color, line2_gradient, 1);
|
||||
else if (line2_gradient > line2_color && line2_thickness != 1)
|
||||
display.drawGradientLine(line2_start_x, line2_start_y, line2_end_x, line2_end_y, line2_color, line2_gradient, line2_thickness);
|
||||
|
||||
if (circle0_fill != -1)
|
||||
display.fillCircle(circle0_center_x, circle0_center_y, circle0_radius, circle0_color);
|
||||
else
|
||||
display.drawCircle(circle0_center_x, circle0_center_y, circle0_radius, circle0_color);
|
||||
|
||||
if (circle1_fill != -1)
|
||||
display.fillCircle(circle1_center_x, circle1_center_y, circle1_radius, circle1_color);
|
||||
else
|
||||
display.drawCircle(circle1_center_x, circle1_center_y, circle1_radius, circle1_color);
|
||||
|
||||
if (triangle0_fill != -1)
|
||||
display.fillTriangle(triangle0_a_x, triangle0_a_y, triangle0_b_x, triangle0_b_y, triangle0_c_x, triangle0_c_y, triangle0_color);
|
||||
else
|
||||
display.drawTriangle(triangle0_a_x, triangle0_a_y, triangle0_b_x, triangle0_b_y, triangle0_c_x, triangle0_c_y, triangle0_color);
|
||||
|
||||
if (triangle1_fill != -1)
|
||||
display.fillTriangle(triangle1_a_x, triangle1_a_y, triangle1_b_x, triangle1_b_y, triangle1_c_x, triangle1_c_y, triangle1_color);
|
||||
else
|
||||
display.drawTriangle(triangle1_a_x, triangle1_a_y, triangle1_b_x, triangle1_b_y, triangle1_c_x, triangle1_c_y, triangle1_color);
|
||||
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
for (int j = 0; j < sizeof(digital_clock0_triangleX) / sizeof(digital_clock0_triangleX[0]); j += 3)
|
||||
{
|
||||
int temp[4] = {digital_clock0_h / 10 % 10, digital_clock0_h % 10, digital_clock0_m / 10 % 10, digital_clock0_m % 10};
|
||||
int b = digital_clock0_bitmask[temp[i]];
|
||||
if (b & (1 << ((j - 1) / (3 * 4))))
|
||||
{
|
||||
display.fillTriangle(
|
||||
(int)((float)i * (float)digital_clock0_maxX / (float)digital_clock0_maxY * (float)digital_clock0_size * 1.1 + (float)digital_clock0_location_x + (float)digital_clock0_maxX / (float)digital_clock0_maxY * (float)digital_clock0_size * (float)digital_clock0_triangleX[j + 0] / (float)digital_clock0_maxX),
|
||||
(int)((float)digital_clock0_location_y + (float)digital_clock0_size * (float)digital_clock0_triangleY[j + 0] / (float)digital_clock0_maxY),
|
||||
|
||||
(int)((float)i * (float)digital_clock0_maxX / (float)digital_clock0_maxY * (float)digital_clock0_size * 1.1 + (float)digital_clock0_location_x + (float)digital_clock0_maxX / (float)digital_clock0_maxY * (float)digital_clock0_size * (float)digital_clock0_triangleX[j + 1] / (float)digital_clock0_maxX),
|
||||
(int)((float)digital_clock0_location_y + (float)digital_clock0_size * (float)digital_clock0_triangleY[j + 1] / (float)digital_clock0_maxY),
|
||||
|
||||
(int)((float)i * (float)digital_clock0_maxX / (float)digital_clock0_maxY * (float)digital_clock0_size * 1.1 + (float)digital_clock0_location_x + (float)digital_clock0_maxX / (float)digital_clock0_maxY * (float)digital_clock0_size * (float)digital_clock0_triangleX[j + 2] / (float)digital_clock0_maxX),
|
||||
(int)((float)digital_clock0_location_y + (float)digital_clock0_size * (float)digital_clock0_triangleY[j + 2] / (float)digital_clock0_maxY),
|
||||
|
||||
0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int digital_clock0_r = 0.05 * (float)digital_clock0_size;
|
||||
|
||||
display.fillCircle((int)((float)digital_clock0_location_x + 4.0 * (float)digital_clock0_maxX / (float)digital_clock0_maxY * (float)digital_clock0_size * 1.075 / 2.0), (int)((float)digital_clock0_location_y + (float)digital_clock0_size * 0.4), digital_clock0_r, 0);
|
||||
display.fillCircle((int)((float)digital_clock0_location_x + 4.0 * (float)digital_clock0_maxX / (float)digital_clock0_maxY * (float)digital_clock0_size * 1.075 / 2.0), (int)((float)digital_clock0_location_y + (float)digital_clock0_size * 0.6), digital_clock0_r, 0);
|
||||
for (int i = 0; i < 60; ++i)
|
||||
{
|
||||
if (i % 5 == 0)
|
||||
display.drawThickLine(widget1_center_x + widget1_r1 * cos((double)i / 60.0 * 2.0 * 3.14159265),
|
||||
widget1_center_y + widget1_r1 * sin((double)i / 60.0 * 2.0 * 3.14159265),
|
||||
widget1_center_x + widget1_r3 * cos((double)i / 60.0 * 2.0 * 3.14159265),
|
||||
widget1_center_y + widget1_r3 * sin((double)i / 60.0 * 2.0 * 3.14159265), 0, 3);
|
||||
else if (widget1_size > 150)
|
||||
display.drawLine(widget1_center_x + widget1_r1 * cos((double)i / 60.0 * 2.0 * 3.14159265),
|
||||
widget1_center_y + widget1_r1 * sin((double)i / 60.0 * 2.0 * 3.14159265),
|
||||
widget1_center_x + widget1_r2 * cos((double)i / 60.0 * 2.0 * 3.14159265),
|
||||
widget1_center_y + widget1_r2 * sin((double)i / 60.0 * 2.0 * 3.14159265), 2);
|
||||
}
|
||||
display.drawThickLine(widget1_center_x,
|
||||
widget1_center_y,
|
||||
widget1_center_x + widget1_r0 * cos((double)(widget1_h - 3.0 + widget1_m / 60.0) / 12.0 * 2.0 * 3.14159265),
|
||||
widget1_center_y + widget1_r0 * sin((double)(widget1_h - 3.0 + widget1_m / 60.0) / 12.0 * 2.0 * 3.14159265), 2, 2);
|
||||
|
||||
display.drawThickLine(widget1_center_x,
|
||||
widget1_center_y,
|
||||
widget1_center_x + widget1_r2 * cos((double)(widget1_m - 15.0) / 60.0 * 2.0 * 3.14159265),
|
||||
widget1_center_y + widget1_r2 * sin((double)(widget1_m - 15.0) / 60.0 * 2.0 * 3.14159265), 2, 2);
|
||||
|
||||
for (int i = 0; i < 60; ++i)
|
||||
{
|
||||
if (i % 5 == 0)
|
||||
display.drawThickLine(widget2_center_x + widget2_r1 * cos((double)i / 60.0 * 2.0 * 3.14159265),
|
||||
widget2_center_y + widget2_r1 * sin((double)i / 60.0 * 2.0 * 3.14159265),
|
||||
widget2_center_x + widget2_r3 * cos((double)i / 60.0 * 2.0 * 3.14159265),
|
||||
widget2_center_y + widget2_r3 * sin((double)i / 60.0 * 2.0 * 3.14159265), 0, 3);
|
||||
else if (widget2_size > 150)
|
||||
display.drawLine(widget2_center_x + widget2_r1 * cos((double)i / 60.0 * 2.0 * 3.14159265),
|
||||
widget2_center_y + widget2_r1 * sin((double)i / 60.0 * 2.0 * 3.14159265),
|
||||
widget2_center_x + widget2_r2 * cos((double)i / 60.0 * 2.0 * 3.14159265),
|
||||
widget2_center_y + widget2_r2 * sin((double)i / 60.0 * 2.0 * 3.14159265), 2);
|
||||
}
|
||||
display.drawThickLine(widget2_center_x,
|
||||
widget2_center_y,
|
||||
widget2_center_x + widget2_r0 * cos((double)(widget2_h - 3.0 + widget2_m / 60.0) / 12.0 * 2.0 * 3.14159265),
|
||||
widget2_center_y + widget2_r0 * sin((double)(widget2_h - 3.0 + widget2_m / 60.0) / 12.0 * 2.0 * 3.14159265), 2, 2);
|
||||
|
||||
display.drawThickLine(widget2_center_x,
|
||||
widget2_center_y,
|
||||
widget2_center_x + widget2_r2 * cos((double)(widget2_m - 15.0) / 60.0 * 2.0 * 3.14159265),
|
||||
widget2_center_y + widget2_r2 * sin((double)(widget2_m - 15.0) / 60.0 * 2.0 * 3.14159265), 2, 2);
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,25 +0,0 @@
|
|||
#include "Inkplate.h"
|
||||
#include "bck_day.h"
|
||||
|
||||
Inkplate display(INKPLATE_1BIT);
|
||||
|
||||
int offSet = 0;
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(115200);
|
||||
display.begin();
|
||||
display.display();
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
|
||||
display.drawBitmap(offSet, 0, (uint8_t *)bck_day, bck_day_w, bck_day_h, BLACK);
|
||||
int32_t t = millis();
|
||||
display.partialUpdate();
|
||||
Serial.println(millis() - t);
|
||||
display.clearDisplay();
|
||||
offSet += 70;
|
||||
offSet %= 300;
|
||||
}
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
jpegs.ino
|
||||
Inkplate 6 Arduino library
|
||||
Zvonimir Haramustek @ e-radionica.com
|
||||
September 24, 2020
|
||||
https://github.com/e-radionicacom/Inkplate-6-Arduino-library
|
||||
|
||||
For support, please reach over forums: forum.e-radionica.com/en
|
||||
For more info about the product, please check: www.inkplate.io
|
||||
|
||||
This code is released under the GNU Lesser General Public License v3.0: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
Please review the LICENSE file included with this example.
|
||||
If you have any questions about licensing, please contact techsupport@e-radionica.com
|
||||
Distributed as-is; no warranty is given.
|
||||
*/
|
||||
|
||||
#include "Inkplate.h"
|
||||
#include "SdFat.h"
|
||||
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
#include "Inkplate.h"
|
||||
|
||||
Inkplate display(INKPLATE_1BIT);
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(115200);
|
||||
|
||||
pinMode(12, INPUT);
|
||||
pinMode(13, INPUT);
|
||||
display.begin();
|
||||
delay(500);
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
Serial.println(analogRead(12));
|
||||
Serial.println(analogRead(13));
|
||||
Serial.println();
|
||||
delay(1000);
|
||||
}
|
Loading…
Reference in New Issue