Skip to content

Commit 2f4f328

Browse files
authored
Merge pull request #194 from SolderedElectronics/dev
Dev to master
2 parents 8c2017d + 1d5bf8c commit 2f4f328

File tree

912 files changed

+72611
-29885
lines changed

Some content is hidden

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

912 files changed

+72611
-29885
lines changed

.github/workflows/compile.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,25 @@ jobs:
3535
fqbn: Inkplate_Boards:esp32:Inkplate6COLOR
3636
additional-sketch-paths: |
3737
- examples/Inkplate6COLOR
38+
- board:
39+
fqbn: Inkplate_Boards:esp32:Inkplate5
40+
additional-sketch-paths: |
41+
- examples/Inkplate5
42+
- board:
43+
fqbn: Inkplate_Boards:esp32:Inkplate2
44+
additional-sketch-paths: |
45+
- examples/Inkplate2
3846
steps:
3947
- name: Checkout
40-
uses: actions/checkout@v2
48+
uses: actions/checkout@v3
4149
- name: Install ESP32 platform dependencies
4250
run: pip3 install pyserial
4351
- name: Compile examples
4452
uses: arduino/compile-sketches@v1
4553
with:
4654
github-token: ${{ secrets.GITHUB_TOKEN }}
4755
platforms: |
48-
- source-url: https://github.com/e-radionicacom/Dasduino-Board-Definitions-for-Arduino-IDE/raw/master/package_Dasduino_Boards_index.json
56+
- source-url: https://github.com/SolderedElectronics/Dasduino-Board-Definitions-for-Arduino-IDE/raw/dev/package_Dasduino_Boards_index.json
4957
name: Inkplate_Boards:esp32
5058
5159
fqbn: ${{ matrix.board.fqbn }}

README.md

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,47 @@
1-
# Inkplate Arduino library
1+
# Soldered Inkplate Arduino library
22

33
[![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)
44

5-
![](https://www.crowdsupply.com/img/cf95/compare-peripheral_jpg_project-body.jpg)
5+
<p align="center">
6+
<img src="https://raw.githubusercontent.com/SolderedElectronics/Inkplate-Arduino-library/dev/extras/InkplateImage.jpg">
7+
</p>
68

7-
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). [Inkplate 6PLUS](https://www.crowdsupply.com/e-radionica/inkplate-6plus) is funding now.
9+
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 and Bluetooth 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, Inkplate 6COLOR and Inkplate 2.
10+
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) and [Inkplate 6COLOR](https://www.crowdsupply.com/soldered/inkplate-6color). Inkplate 2 was funded on [Kickstarter](https://www.kickstarter.com/projects/solderedelectronics/inkplate-2-a-easy-to-use-arduino-compatible-e-paper). All available to purchase from [soldered.com](https://soldered.com/categories/inkplate/).
911

1012
### Setting up Inkplate in Arduino IDE
1113

1214
In order to get a head start with Inkplate (any), follow these steps:
1315

14-
1. [Install Inkplate board definition](https://github.com/e-radionicacom/Croduino-Board-Definitions-for-Arduino-IDE/blob/master/README.md) - add Inkplate 6/10/6PLUS 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/).
15-
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/)
16-
3. Install Inkplate 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?).
17-
4. You are ready to get started! Select Tools -> Board -> Inkplate (pick correct one), as well as correct COM port and upload!
16+
1. [Install Inkplate board definition](https://github.com/SolderedElectronics/Dasduino-Board-Definitions-for-Arduino-IDE/blob/master/README.md) - add Inkplate 6/10/6PLUS/6COLOR/2 as a board into your Arduino IDE. Follow the instructions on the [link](https://soldered.com/learn/add-inkplate-6-board-definition-to-arduino-ide/).
17+
2. Install CH340 drivers (if you don't have them yet) - instructions [here](https://soldered.com/learn/ch340-driver-installation-croduino-basic3-nova2/)
18+
3. Install Inkplate Arduino library - Install the library from the Arduino Library Manager (just type "Inkplate" and click "Install") or install it with this repo. If you don't know how, check our [tutorial](https://soldered.com/learn/arduino-library/#Kako%20instaliraty%20library?).
19+
4. You are ready to get started! Select Tools -> Board -> Inkplate Boards and then pick correct one, as well as correct COM port and upload!
1820

1921
### Code examples
2022

21-
There are many examples in the library that you demonstrate how to use any of the Inkplate functionality. Use Basic folder to get familiar with principles of using the Inkplate, such as modes (BW and Gray), how to write graphics and text or just basic capabilites such as touchscreen or front lighting (if your Inkplate supports it). In Advanced folder, you'll learn how to make HTTP/HTTPS requests, utilise low power, use touchpads or SD card. Finally, get easily started on some projects. More are added regularly, such as projects or community contributions.
23+
There are many examples in the library that you demonstrate how to use any of the Inkplate functionality. Use Basic folder to get familiar with principles of using the Inkplate, such as modes (BW and Gray), how to write graphics and text or just basic capabilites such as touchscreen or front lighting (if your Inkplate supports it). In Advanced folder, you'll learn how to make HTTP/HTTPS requests, utilise low power, use touchpads or SD card, read RTC, etc. Finally, get easily started on some projects. Some of the projects are Google calendar, Weather Station, Image Frame, Crypto Currency Tracker and more. Examples and projects are added regularly by us or from community contributions. There is also a diagnostics folder with all tools for more advanced users (such as VCOM programming, waveform selection, etc).
2224

2325
### Documentation
2426

2527
Find Inkplate documentation [here](https://inkplate.readthedocs.io/en/latest/arduino.html).
2628

2729

28-
### Using Inkplate 6 with another microcontroller - Peripheral mode
30+
### Using Inkplate with another microcontroller - Peripheral mode
2931

30-
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.
32+
Inkplate 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.
3133

32-
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).
34+
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/peripheral-mode.html).
3335

3436
### Battery power
3537

36-
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.
38+
Inkplate boards 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 (except on Inkplate 2, it uses SMD solder pads for battery terminals). 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 (excluding Inkplate 2, it uses [this battery](https://soldered.com/product/li-ion-baterija-600mah-3-7v/). [This battery](https://soldered.com/product/li-ion-battery-1200mah-3-7v/) is good fit for the Inkplate. Also, Inkplate's hardware is specially optimized for low power consumption in deep sleep mode, making it extremely suitable for battery applications.
39+
40+
#### ⚠️ WARNING
41+
Please check the polarity on the battery JST connector! Some batteries that can be purchased from the web have reversed polarity that can damage Inkplate board! You are safe if you are using the pouch battery from [soldered.com](https://soldered.com/categories/power-sources-batteries/batteries/lithium-batteries/) or Inkplate with the built-in battery .
42+
43+
#### ℹ NOTE
44+
CR2032 battery is only for RTC backup. Inkplate cannot be powered with it.
3745

3846
### Linux?
3947

@@ -47,7 +55,7 @@ apt install python-is-python3
4755

4856
### Micropython
4957

50-
If you are looking for micropython support, please find all details [here](https://github.com/e-radionicacom/Inkplate-micropython).
58+
If you are looking for micropython support, please find all details [here](https://github.com/SolderedElectronics/Inkplate-micropython).
5159

5260
### License
5361

@@ -57,19 +65,26 @@ This repo uses the source code from another repositories. All their license file
5765

5866
All of Inkplate-related development is open-sourced:
5967

60-
- [Arduino library](https://github.com/e-radionicacom/Inkplate-6-Arduino-library)
61-
- Hardware design: [Inkplate 6](https://github.com/e-radionicacom/Inkplate-6-hardware), [Inkplate 10](https://github.com/e-radionicacom/Inkplate-10-hardware)
62-
- [micropython Inkplate](https://github.com/e-radionicacom/Inkplate-6-micropython)
63-
- OSHWA cerfiticate: [Inkplate 6](https://certification.oshwa.org/hr000003.html), [Inkplate 10](https://certification.oshwa.org/hr000006.html)
68+
- [Arduino library](https://github.com/SolderedElectronics/Inkplate-Arduino-library)
69+
- Hardware design:
70+
- Soldered Inkplate 2 (comming soon!)
71+
- Soldered Inkplate 6 (comming soon!)
72+
- Soldered Inkplate 6PLUS (comming soon!)
73+
- [Soldered Inkplate 10](https://github.com/SolderedElectronics/Soldered-Inkplate-10-hardware-design)
74+
- Soldered Inkplate 6COLOR (comming soon!)
75+
- [e-radionica.com Inkplate 6](https://github.com/SolderedElectronics/Inkplate-6-hardware)
76+
- [e-radionica.com Inkplate 10](https://github.com/SolderedElectronics/Inkplate-10-hardware)
77+
- [e-radionica.com Inkplate 6PLUS](https://github.com/SolderedElectronics/Inkplate-6PLUS-Hardware)
78+
- e-radionica.com Inkplate 6COLOR (comming soon!)
79+
- [micropython Inkplate](https://github.com/SolderedElectronics/Inkplate-micropython)
80+
- [OSHWA cerfiticates](https://certification.oshwa.org/list.html?q=inkplate)
6481

6582
### Where to buy & other
6683

67-
Inkplate 6 is available for purchase via:
84+
Inkplate boards are available for purchase via:
6885

69-
- [e-radionica.com](https://e-radionica.com/en/inkplate.html)
70-
- [Crowd Supply](https://www.crowdsupply.com/e-radionica/inkplate-6)
86+
- [soldered.com](https://soldered.com/categories/inkplate/)
87+
- [Crowd Supply](https://www.crowdsupply.com/soldered)
7188
- [Mouser](https://hr.mouser.com/Search/Refine?Keyword=inkplate)
72-
- [Pimoroni](https://shop.pimoroni.com/products/inkplate-6)
7389

74-
For all questions and issues, please use our [forum](http://forum.e-radionica.com/en) to ask an question.
75-
For sales & collaboration, please reach us via [e-mail](mailto:[email protected]).
90+
For all questions and issues please reach us via [e-mail](mailto:[email protected]) or our [contact form](https://soldered.com/contact/).

examples/Inkplate10/Advanced/Communications/Inkplate10_Bluetooth_Peripheral_Mode/Inkplate10_Bluetooth_Peripheral_Mode.ino

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,59 +6,78 @@
66
https://soldered.com/learn/add-inkplate-6-board-definition-to-arduino-ide/
77
88
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 :(
9+
More about peripheral mode: https://inkplate.readthedocs.io/en/latest/peripheral-mode.html
10+
11+
Upload this example to the Inkplate and connect your phone to it via Bluetooth.
12+
First, you have to pair the Inkplate with your phone in Bluetooth settings in your phone, then go to the
13+
Serial Bluetooth Terminal app and you can find the Inkplate in the device list. You can use another similar app.
14+
If Bluetooth starts successfully, you can send commands from your phone. Don't forget you need to send #L(1)* after
15+
each command to show it on the display (equal to display->display()).
1016
1117
Want to learn more about Inkplate? Visit www.inkplate.io
1218
Looking to get support? Write on our forums: https://forum.soldered.com/
13-
15 July 2020 by Soldered
19+
28 March 2023 by Soldered
1420
*/
1521

1622
// Next 3 lines are a precaution, you can ignore those, and the example would also work without them
1723
#if !defined(ARDUINO_INKPLATE10) && !defined(ARDUINO_INKPLATE10V2)
18-
#error "Wrong board selection for this example, please select e-radionica Inkplate10 or Soldered Inkplate10 in the boards menu."
24+
#error \
25+
"Wrong board selection for this example, please select e-radionica Inkplate10 or Soldered Inkplate10 in the boards menu."
1926
#endif
2027

21-
#include "Inkplate.h"
22-
28+
// Include Inkplate and BluetoothSerial library to the sketch
2329
#include "BluetoothSerial.h"
30+
#include "Inkplate.h"
2431

25-
#define BUFFER_SIZE 1000
26-
32+
// Include peripheral functions
2733
#include "Peripheral.h"
2834

29-
// Declare Inkplate and SerialBluetooth objects
35+
// Create an object on Inkplate library and also set library into 1-bit mode (BW)
3036
Inkplate display(INKPLATE_1BIT);
37+
38+
// Create SerialBT object for Bluetooth communication
3139
BluetoothSerial SerialBT;
3240

41+
// Size of buffer for receiving commands
42+
#define BUFFER_SIZE 1000
43+
3344
// Temporary buffer to send to Peripheral mode code
3445
char commandBuffer[BUFFER_SIZE + 1];
3546

3647
void setup() // Initialize everything
3748
{
49+
// Init serial communication
3850
Serial.begin(115200);
3951

40-
if (!SerialBT.begin("ESP32"))
52+
// Init Inkplate library (you should call this function ONLY ONCE)
53+
display.begin();
54+
55+
// Init BT communication
56+
if (!SerialBT.begin("Inkplate10"))
4157
{
4258
Serial.println("An error occurred initializing Bluetooth");
4359
}
44-
45-
display.begin();
60+
else
61+
{
62+
Serial.println("The device started, now you can pair it with Bluetooth and send commands!");
63+
}
4664
}
4765

4866
void loop()
4967
{
50-
while (SerialBT.available()) // When Bluetooth available save it and pass to Peripheral.h code
68+
// When Bluetooth available save it and pass to Peripheral.h code
69+
while (SerialBT.available())
5170
{
5271
for (int i = 0; i < (BUFFER_SIZE - 1); i++)
5372
{
5473
commandBuffer[i] = commandBuffer[i + 1];
5574
}
5675
commandBuffer[BUFFER_SIZE - 1] = SerialBT.read();
57-
Serial.print(commandBuffer[BUFFER_SIZE - 1]);
5876
}
5977

6078
// Function in peripheral.h
61-
run(commandBuffer, BUFFER_SIZE);
79+
run(commandBuffer, BUFFER_SIZE, &display, &SerialBT);
6280

81+
// Wait a bit
6382
delay(50);
6483
}

0 commit comments

Comments
 (0)