Skip to content

Commit 2aaa20e

Browse files
authored
Merge pull request #93 from e-radionicacom/dev
Dev, added Inkplate5
2 parents b836fcc + 5ca567d commit 2aaa20e

File tree

736 files changed

+197708
-8
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

736 files changed

+197708
-8
lines changed

.github/workflows/compile.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ jobs:
77
strategy:
88
matrix:
99
include:
10-
- board:
11-
fqbn: Dasduino_Boards:Inkplate:Inkplate5
12-
additional-sketch-paths: |
13-
- examples/Inkplate5
1410
- board:
1511
fqbn: Dasduino_Boards:Inkplate:Inkplate6
1612
additional-sketch-paths: |
@@ -19,10 +15,18 @@ jobs:
1915
fqbn: Dasduino_Boards:Inkplate:Inkplate10
2016
additional-sketch-paths: |
2117
- examples/Inkplate10
18+
- board:
19+
fqbn: Dasduino_Boards:Inkplate:Inkplate5
20+
additional-sketch-paths: |
21+
- examples/Inkplate5
2222
- board:
2323
fqbn: Dasduino_Boards:Inkplate:Inkplate6plus
2424
additional-sketch-paths: |
2525
- examples/Inkplate6PLUS
26+
- board:
27+
fqbn: Dasduino_Boards:Inkplate:Inkplatecolor
28+
additional-sketch-paths: |
29+
- examples/InkplateColor
2630
steps:
2731
- name: Checkout
2832
uses: actions/checkout@v2

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Inkplate Arduino library
22

3-
[![Compile Sketches](https://github.com/e-radionicacom/Inkplate-Arduino-library/actions/workflows/compile.yml/badge.svg?branch=master)](https://github.com/e-radionicacom/Inkplate-Arduino-library/actions/workflows/compile.yml)
3+
[![Compile Sketches](https://github.com/e-radionicacom/Inkplate-Arduino-library/actions/workflows/compile.yml/badge.svg?branch=dev)](https://github.com/e-radionicacom/Inkplate-Arduino-library/actions/workflows/compile.yml)
44

55
![](https://www.crowdsupply.com/img/cf95/compare-peripheral_jpg_project-body.jpg)
66

77
Arduino library for all-in-one e-paper display family named Inkplate can be found in this repo. Inkplate is a series of powerful, Wi-Fi enabled ESP32-based e-paper display products. 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. Inkplate family currently includes Inkplate 10, Inkplate 6 and Inkplate 6PLUS - learn more about Inkplates on [official website](https://inkplate.io/).
8-
Inkplate 6 was crowdfunded on [Crowd Supply](https://www.crowdsupply.com/e-radionica/inkplate-6), as well as [Inkplate 10](https://www.crowdsupply.com/e-radionica/inkplate-10) and [Inkplate 6PLUS](https://www.crowdsupply.com/e-radionica/inkplate-6plus).
8+
Inkplate 6 was crowdfunded on [Crowd Supply](https://www.crowdsupply.com/e-radionica/inkplate-6), as well as [Inkplate 10]([https://www.crowdsupply.com/e-radionica/inkplate-10). [Inkplate 6PLUS](https://www.crowdsupply.com/e-radionica/inkplate-6plus) is funding now.
99

1010
### Setting up Inkplate in Arduino IDE
1111

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
Inkplate_Battery_Voltage_And_Temperature example for e-radionica Inkplate 5
3+
For this example you will need USB cable, Inkplate 5 and a Lithium battery (3.6V) with two pin JST connector.
4+
Select "Inkplate 5(ESP32)" from Tools -> Board menu.
5+
Don't have "Inkplate 5(ESP32)" option? Follow our tutorial and add it:
6+
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
7+
8+
This example will show you how to read voltage of the battery and read temperature from on-board
9+
temperature sensor which is part of TPS65186 e-paper PMIC.
10+
NOTE: In order to read temperature, e-paper has to be refreshed at least one time,
11+
or you have to power up epaper PMIC with einkOn() function from Inkplate library.
12+
13+
Want to learn more about Inkplate? Visit www.inkplate.io
14+
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
15+
15 July 2020 by e-radionica.com
16+
*/
17+
18+
// Next 3 lines are a precaution, you can ignore those, and the example would also work without them
19+
#ifndef ARDUINO_INKPLATE5
20+
#error "Wrong board selection for this example, please select Inkplate 5 in the boards menu."
21+
#endif
22+
23+
#include "Inkplate.h" //Include Inkplate library to the sketch
24+
#include "symbols.h" //Include .h file that contains byte array for battery symbol and temperature symbol.
25+
// It is in same folder as this sketch. You can even open it (read it) by clicking on symbols.h tab in Arduino IDE
26+
Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1-bit mode (BW)
27+
28+
void setup()
29+
{
30+
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
31+
display.clearDisplay(); // Clear frame buffer of display
32+
display.display(); // Put clear image on display
33+
display.setTextSize(2); // Scale text to be two times bigger then original (5x7 px)
34+
display.setTextColor(BLACK, WHITE); // Set text color to black and background color to white
35+
}
36+
37+
void loop()
38+
{
39+
int temperature;
40+
float voltage;
41+
42+
temperature = display.readTemperature(); // Read temperature from on-board temperature sensor
43+
voltage =
44+
display.readBattery(); // Read battery voltage (NOTE: Doe to ESP32 ADC accuracy, you should calibrate the ADC!)
45+
display.clearDisplay(); // Clear everything in frame buffer of e-paper display
46+
display.drawImage(battSymbol, 100, 100, 106, 45, BLACK); // Draw battery symbol at position X=100 Y=100
47+
display.setCursor(210, 120);
48+
display.print(voltage, 2); // Print battery voltage
49+
display.print('V');
50+
51+
display.drawImage(tempSymbol, 100, 200, 38, 79, BLACK); // Draw temperature symbol at position X=100, Y=200
52+
display.setCursor(150, 225);
53+
display.print(temperature, DEC); // Print temperature
54+
display.print('C');
55+
display.display(); // Send everything to display (refresh the screen)
56+
delay(10000); // Wait 10 seconds before new measurement
57+
}
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
//Bitmap size: 38x79
2+
const uint8_t tempSymbol[] = {
3+
0x00, 0x3f, 0x80, 0x00, 0x00,
4+
0x00, 0x7f, 0xc0, 0x00, 0x00,
5+
0x00, 0x7f, 0xc0, 0x00, 0x00,
6+
0x00, 0x71, 0xc0, 0x00, 0x00,
7+
0x00, 0xe0, 0xe0, 0x3f, 0xfc,
8+
0x00, 0xe0, 0xe0, 0x3f, 0xfc,
9+
0x00, 0xe0, 0xe0, 0x3f, 0xfc,
10+
0x00, 0xe0, 0xe0, 0x00, 0x00,
11+
0x00, 0xe0, 0xe0, 0x00, 0x00,
12+
0x00, 0xe0, 0xe0, 0x00, 0x00,
13+
0x00, 0xe0, 0xe0, 0x00, 0x00,
14+
0x00, 0xe0, 0xe0, 0x3e, 0x00,
15+
0x00, 0xe0, 0xe0, 0x3e, 0x00,
16+
0x00, 0xe0, 0xe0, 0x3e, 0x00,
17+
0x00, 0xe0, 0xe0, 0x00, 0x00,
18+
0x00, 0xe0, 0xe0, 0x00, 0x00,
19+
0x00, 0xe0, 0xe0, 0x00, 0x00,
20+
0x00, 0xe0, 0xe0, 0x00, 0x00,
21+
0x00, 0xee, 0xe0, 0x00, 0x00,
22+
0x00, 0xee, 0xe0, 0x3e, 0x00,
23+
0x00, 0xee, 0xe0, 0x3e, 0x00,
24+
0x00, 0xee, 0xe0, 0x3e, 0x00,
25+
0x00, 0xee, 0xe0, 0x00, 0x00,
26+
0x00, 0xee, 0xe0, 0x00, 0x00,
27+
0x00, 0xee, 0xe0, 0x00, 0x00,
28+
0x00, 0xee, 0xe0, 0x00, 0x00,
29+
0x00, 0xee, 0xe0, 0x00, 0x00,
30+
0x00, 0xee, 0xe0, 0x3f, 0xfc,
31+
0x00, 0xee, 0xe0, 0x3f, 0xfc,
32+
0x00, 0xee, 0xe0, 0x3f, 0xfc,
33+
0x00, 0xee, 0xe0, 0x00, 0x00,
34+
0x00, 0xee, 0xe0, 0x00, 0x00,
35+
0x00, 0xee, 0xe0, 0x00, 0x00,
36+
0x00, 0xee, 0xe0, 0x00, 0x00,
37+
0x00, 0xee, 0xe0, 0x3e, 0x00,
38+
0x00, 0xee, 0xe0, 0x3e, 0x00,
39+
0x00, 0xee, 0xe0, 0x3e, 0x00,
40+
0x00, 0xee, 0xe0, 0x00, 0x00,
41+
0x00, 0xee, 0xe0, 0x00, 0x00,
42+
0x00, 0xee, 0xe0, 0x00, 0x00,
43+
0x00, 0xee, 0xe0, 0x00, 0x00,
44+
0x00, 0xee, 0xe0, 0x00, 0x00,
45+
0x00, 0xee, 0xe0, 0x3e, 0x00,
46+
0x00, 0xee, 0xe0, 0x3e, 0x00,
47+
0x00, 0xee, 0xe0, 0x3e, 0x00,
48+
0x00, 0xee, 0xe0, 0x00, 0x00,
49+
0x00, 0xee, 0xe0, 0x00, 0x00,
50+
0x00, 0xee, 0xe0, 0x00, 0x00,
51+
0x00, 0xee, 0xe0, 0x00, 0x00,
52+
0x00, 0xee, 0xe0, 0x00, 0x00,
53+
0x00, 0xee, 0xe0, 0x3f, 0xfc,
54+
0x00, 0xee, 0xe0, 0x3f, 0xfc,
55+
0x00, 0xee, 0xe0, 0x3f, 0xfc,
56+
0x00, 0xee, 0xe0, 0x00, 0x00,
57+
0x01, 0xee, 0xf0, 0x00, 0x00,
58+
0x03, 0xee, 0xf8, 0x00, 0x00,
59+
0x0f, 0xce, 0x7e, 0x00, 0x00,
60+
0x1f, 0x0e, 0x1f, 0x00, 0x00,
61+
0x1e, 0x0e, 0x0f, 0x80, 0x00,
62+
0x3c, 0x0f, 0x07, 0x80, 0x00,
63+
0x78, 0x3f, 0xc3, 0xc0, 0x00,
64+
0x70, 0x7f, 0xe1, 0xc0, 0x00,
65+
0x70, 0xff, 0xf1, 0xc0, 0x00,
66+
0xe0, 0xff, 0xf8, 0xe0, 0x00,
67+
0xe1, 0xff, 0xf8, 0xe0, 0x00,
68+
0xe1, 0xff, 0xf8, 0xe0, 0x00,
69+
0xe1, 0xff, 0xf8, 0xe0, 0x00,
70+
0xe1, 0xff, 0xf8, 0xe0, 0x00,
71+
0xe0, 0xff, 0xf8, 0xe0, 0x00,
72+
0x70, 0xff, 0xf1, 0xc0, 0x00,
73+
0x70, 0x7f, 0xe1, 0xc0, 0x00,
74+
0x78, 0x3f, 0xc3, 0xc0, 0x00,
75+
0x3c, 0x1f, 0x87, 0x80, 0x00,
76+
0x3e, 0x00, 0x0f, 0x80, 0x00,
77+
0x1f, 0x00, 0x1f, 0x00, 0x00,
78+
0x0f, 0xc0, 0x7e, 0x00, 0x00,
79+
0x03, 0xff, 0xfc, 0x00, 0x00,
80+
0x01, 0xff, 0xf0, 0x00, 0x00,
81+
0x00, 0x3f, 0x80, 0x00, 0x00
82+
};
83+
//Bitmap size: 106x45
84+
const uint8_t battSymbol[] = {
85+
0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00,
86+
0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00,
87+
0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x7f, 0x00, 0x00,
88+
0x7f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x0f, 0xc0, 0x00, 0x00, 0x7f, 0x80, 0x00,
89+
0x7f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x03, 0xc0, 0x00, 0x00, 0xf7, 0xe0, 0x00,
90+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x01, 0xe0, 0x00, 0x00, 0xe1, 0xf8, 0x00,
91+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xe0, 0x00, 0x01, 0xe0, 0x7c, 0x00,
92+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xe0, 0x00, 0x01, 0xc0, 0x3f, 0x00,
93+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xe0, 0x00, 0x03, 0xc0, 0x0f, 0x80,
94+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xe0, 0x00, 0x03, 0x80, 0x07, 0xc0,
95+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xe0, 0x00, 0x07, 0x00, 0x07, 0xc0,
96+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xe0, 0x00, 0x0f, 0x00, 0x0f, 0x80,
97+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xe0, 0x00, 0x0e, 0x00, 0x3e, 0x00,
98+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0x80, 0x0e, 0x00, 0x7c, 0x00,
99+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xc0, 0x0f, 0x00, 0xf8, 0x00,
100+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xc0, 0x07, 0x83, 0xe0, 0x00,
101+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xc0, 0x0f, 0x07, 0xc0, 0x00,
102+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xc0, 0x0e, 0x0f, 0x00, 0x00,
103+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xc0, 0x1e, 0x0f, 0x00, 0x00,
104+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xc0, 0x3c, 0x0f, 0x80, 0x00,
105+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xc0, 0x78, 0x07, 0xc0, 0x00,
106+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xc0, 0xf0, 0x07, 0xc0, 0x00,
107+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xc0, 0xe0, 0x0f, 0x80, 0x00,
108+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xc1, 0xe0, 0x1f, 0x00, 0x00,
109+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xc3, 0xc0, 0x7c, 0x00, 0x00,
110+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xc3, 0xe0, 0xf8, 0x00, 0x00,
111+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xc1, 0xe1, 0xf0, 0x00, 0x00,
112+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xc0, 0xe3, 0xc0, 0x00, 0x00,
113+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xc1, 0xe7, 0x80, 0x00, 0x00,
114+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xc1, 0xc7, 0x80, 0x00, 0x00,
115+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xc3, 0xc7, 0xc0, 0x00, 0x00,
116+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xc3, 0x83, 0xc0, 0x00, 0x00,
117+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0x87, 0x07, 0xc0, 0x00, 0x00,
118+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xe0, 0x0f, 0x1f, 0x00, 0x00, 0x00,
119+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xe0, 0x0e, 0x3e, 0x00, 0x00, 0x00,
120+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xe0, 0x1e, 0x7c, 0x00, 0x00, 0x00,
121+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xe0, 0x1c, 0xf0, 0x00, 0x00, 0x00,
122+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xe0, 0x3b, 0xe0, 0x00, 0x00, 0x00,
123+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x01, 0xe0, 0x7f, 0xc0, 0x00, 0x00, 0x00,
124+
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x03, 0xe0, 0x7f, 0x80, 0x00, 0x00, 0x00,
125+
0x7f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x07, 0xc0, 0xfe, 0x00, 0x00, 0x00, 0x00,
126+
0x7f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x1f, 0xc0, 0xfc, 0x00, 0x00, 0x00, 0x00,
127+
0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x81, 0xf8, 0x00, 0x00, 0x00, 0x00,
128+
0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x00,
129+
0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00
130+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*
2+
Inkplate_Bluetooth_Peripheral_Mode_Example example for e-radionica Inkplate 6
3+
For this example you will need USB cable and an Inkplate 6
4+
Select "Inkplate 5(ESP32)" from Tools -> Board menu.
5+
Don't have "Inkplate 5(ESP32)" option? Follow our tutorial and add it:
6+
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
7+
8+
This example shows how to use Inkplate as a peripheral device over Bluetooth.
9+
Note: for this to work you need to use ESP32 Wroover Board definition, as ours currently has a bug :(
10+
11+
Want to learn more about Inkplate? Visit www.inkplate.io
12+
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
13+
15 July 2020 by e-radionica.com
14+
*/
15+
16+
#include "Inkplate.h"
17+
18+
#include "BluetoothSerial.h"
19+
20+
#define BUFFER_SIZE 1000
21+
22+
#include "Peripheral.h"
23+
24+
// Declare Inkplate and SerialBluetooth objects
25+
Inkplate display(INKPLATE_1BIT);
26+
BluetoothSerial SerialBT;
27+
28+
// Temporary buffer to send to Peripheral mode code
29+
char commandBuffer[BUFFER_SIZE + 1];
30+
31+
void setup() // Initialize everything
32+
{
33+
Serial.begin(115200);
34+
35+
if (!SerialBT.begin("ESP32"))
36+
{
37+
Serial.println("An error occurred initializing Bluetooth");
38+
}
39+
40+
display.begin();
41+
}
42+
43+
void loop()
44+
{
45+
while (SerialBT.available()) // When Bluetooth available save it and pass to Peripheral.h code
46+
{
47+
for (int i = 0; i < (BUFFER_SIZE - 1); i++)
48+
{
49+
commandBuffer[i] = commandBuffer[i + 1];
50+
}
51+
commandBuffer[BUFFER_SIZE - 1] = SerialBT.read();
52+
Serial.print(commandBuffer[BUFFER_SIZE - 1]);
53+
}
54+
55+
// Function in peripheral.h
56+
run(commandBuffer, BUFFER_SIZE);
57+
58+
delay(50);
59+
}

0 commit comments

Comments
 (0)