Skip to content

Commit fe50831

Browse files
committed
Merge branch 'dev'
2 parents 8e341dc + 092f5d3 commit fe50831

File tree

651 files changed

+212543
-34
lines changed

Some content is hidden

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

651 files changed

+212543
-34
lines changed

.github/workflows/compile.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ jobs:
3939
fqbn: Inkplate_Boards:esp32:Inkplate6plusV2
4040
additional-sketch-paths: |
4141
- examples/Inkplate6PLUS
42+
- board:
43+
fqbn: Inkplate_Boards:esp32:Inkplate6Flick
44+
additional-sketch-paths: |
45+
- examples/Inkplate6FLICK
4246
- board:
4347
fqbn: Inkplate_Boards:esp32:Inkplate6COLOR
4448
additional-sketch-paths: |

examples/Inkplate6COLOR/Projects/Inkplate6COLOR_Google_Calendar/Inkplate6COLOR_Google_Calendar.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,4 +594,4 @@ void drawData()
594594
display.print(" more events");
595595
}
596596
}
597-
}
597+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
/*
2+
Inkplate6FLICK_Bluetooth_Peripheral_Mode example for Soldered Inkplate 6FLICK
3+
For this example you will need USB cable and an Inkplate 6FLICK
4+
Select "Soldered Inkplate 6FLICK" from Tools -> Board menu.
5+
Don't have "Soldered Inkplate 6FLICK" option? Follow our tutorial and add it:
6+
https://soldered.com/learn/add-inkplate-6-board-definition-to-arduino-ide/
7+
8+
This example shows how to use Inkplate as a peripheral device over Bluetooth.
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()).
16+
17+
Want to learn more about Inkplate? Visit www.inkplate.io
18+
Looking to get support? Write on our forums: https://forum.soldered.com/
19+
18 March 2024 by Soldered
20+
*/
21+
22+
// Next 3 lines are a precaution, you can ignore those, and the example would also work without them
23+
#ifndef ARDUINO_INKPLATE6FLICK
24+
#error "Wrong board selection for this example, please select Soldered Inkplate 6FLICK"
25+
#endif
26+
27+
// Include Inkplate and BluetoothSerial library to the sketch
28+
#include "BluetoothSerial.h"
29+
#include "Inkplate.h"
30+
31+
// Include peripheral functions
32+
#include "Peripheral.h"
33+
34+
// Create an object on Inkplate library and also set library into 1-bit mode (BW)
35+
Inkplate display(INKPLATE_1BIT);
36+
37+
// Create SerialBT object for Bluetooth communication
38+
BluetoothSerial SerialBT;
39+
40+
// Size of buffer for receiving commands
41+
#define BUFFER_SIZE 1000
42+
43+
// Temporary buffer to send to Peripheral mode code
44+
char commandBuffer[BUFFER_SIZE + 1];
45+
46+
void setup() // Initialize everything
47+
{
48+
// Init serial communication
49+
Serial.begin(115200);
50+
51+
// Init Inkplate library (you should call this function ONLY ONCE)
52+
display.begin();
53+
54+
// Init BT communication
55+
if (!SerialBT.begin("Inkplate 6FLICK"))
56+
{
57+
Serial.println("An error occurred initializing Bluetooth");
58+
}
59+
else
60+
{
61+
Serial.println("The device started, now you can pair it with Bluetooth and send commands!");
62+
}
63+
}
64+
65+
void loop()
66+
{
67+
// When Bluetooth available save it and pass to Peripheral.h code
68+
while (SerialBT.available())
69+
{
70+
for (int i = 0; i < (BUFFER_SIZE - 1); i++)
71+
{
72+
commandBuffer[i] = commandBuffer[i + 1];
73+
}
74+
commandBuffer[BUFFER_SIZE - 1] = SerialBT.read();
75+
}
76+
77+
// Function in peripheral.h
78+
run(commandBuffer, BUFFER_SIZE, &display, &SerialBT);
79+
80+
// Wait a bit
81+
delay(50);
82+
}

0 commit comments

Comments
 (0)