Skip to content

Commit 7cb9825

Browse files
nitko12BornaBirolanratgogi640gaffo
authored
Sync (#134)
* fixes touchpad wake examples * Fixes for new board def * remove wake interupt from inkplate6 * Update Inkplate6plus.cpp * Update intro comments IP10/Inkplate_Touchpads.ino (#125) Cleaned up some of the verbiage to remove spelling mistakes and make read a bit easier. * Update compile.yml * Update compile.yml * fix of Inkplate 5 not compiling examples * Update compile.yml * Update the bitmap offset to 32-bit word to match the GFXglyph (#126) The GFXglyph bitmapOffset field was modified to 32 bit for large bitmaps. However, when reading the word, only the lower 16-bit are read, resulting in bad offsets for bitmaps greater than 65535. * fix network client joinAP wait logic (#120) * Added microSD card test on Inkplate10 * Added micro SD card slot for all Inkplate boards with VCOM programming, fixed micro SD card test code on Inkplate 10, fixed VCOM programming on Inkplate 5 board. * Fixed epaper power up sequence Default TPS65186 power up sequence had swapped VEE and VNEG sequence. * Committing clang-format changes * Fixed bug with SD card and Factory VCOM programming * 5.5.2 Fixed functions for getting time rtcReadTime() function renamed to rtcGetRtcData() and examples renamed accordingly. Time variables are transfered to struct called date_time and are defined as a variable rtc_time. Now before getting any of time variables it is necessary to call function rtcGetRtcData(); so rtc can save data to rtc_time. * Committing clang-format changes * Update Inkplate6plus.cpp Fixed enabling of frontlight at waking up Inkplate 6PLUS. * Time variables fixed * Fixed Inkplate6Plus Factory Programming VCOM example. * Committing clang-format changes * Updated documentation Descriptions of functions are updated. * Committing clang-format changes * Update System.cpp Fixed reference year for writing to RTC. * Update System.cpp Previous commit fix. * Fixes for new board def (#128) Co-authored-by: Borna Biro <[email protected]> * Fixed wake up on touchpads on Inkplate5, Inkplate6 and Inkplate10. * Removed Inkplate_Wake_up_on_touchpads example and added Inkplate_Wake_up_on_touchscreen * Added Inkplate Clean examples. Added examples for cleaning epaper panel from burn-in. * Comments in system.h * Update InkplateColor.h * Inkplate 6COLOR fix * Fixed jpg not compiling * Update Inkplate6plus.cpp * Update intro comments IP10/Inkplate_Touchpads.ino (#125) Cleaned up some of the verbiage to remove spelling mistakes and make read a bit easier. * Update compile.yml * Update compile.yml * Update compile.yml * Name fixes 6COLOR * Renamed example * Merging new changes (#132) * Fixes for new board def * Update Inkplate6plus.cpp * Update intro comments IP10/Inkplate_Touchpads.ino (#125) Cleaned up some of the verbiage to remove spelling mistakes and make read a bit easier. * Update compile.yml * Update compile.yml * fix of Inkplate 5 not compiling examples Co-authored-by: Borna Biro <[email protected]> Co-authored-by: Goran Jurić <[email protected]> Co-authored-by: Mike Gaffney <[email protected]> * Update the bitmap offset to 32-bit word to match the GFXglyph (#126) The GFXglyph bitmapOffset field was modified to 32 bit for large bitmaps. However, when reading the word, only the lower 16-bit are read, resulting in bad offsets for bitmaps greater than 65535. * fix network client joinAP wait logic (#120) * Merging * Waveform dimensions fix * Removed example touchpad note Co-authored-by: Borna Biro <[email protected]> Co-authored-by: Ian Foster <[email protected]> Co-authored-by: Ian Foster <[email protected]> Co-authored-by: Goran Jurić <[email protected]> Co-authored-by: Mike Gaffney <[email protected]> Co-authored-by: samacleese <[email protected]> Co-authored-by: Clang Robot <[email protected]>
1 parent 679db72 commit 7cb9825

File tree

12 files changed

+68
-58
lines changed

12 files changed

+68
-58
lines changed

.github/workflows/compile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ jobs:
4747
- name: ArduinoJson
4848
- name: Time
4949
sketch-paths: |
50-
${{ matrix.additional-sketch-paths }}
50+
${{ matrix.additional-sketch-paths }}

examples/Inkplate10/Advanced_Inkplate_Features/Inkplate_Wake_Up_On_Touchpads/Inkplate_Wake_Up_On_Touchpads.ino

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@
2424
// Time ESP32 will go to sleep (in seconds)
2525
#define TIME_TO_SLEEP 30
2626

27+
// bitmask for GPIO_34 which is connected to MCP INTB
28+
#define TOUCHPAD_WAKE_MASK (int64_t(1) << GPIO_NUM_34)
29+
2730
// Initiate Inkplate object
2831
Inkplate display(INKPLATE_1BIT);
2932

30-
byte touchPadPin = 10;
31-
3233
// Store int in rtc data, to remain persistent during deep sleep
3334
RTC_DATA_ATTR int bootCount = 0;
3435

@@ -38,21 +39,18 @@ void setup()
3839
display.begin();
3940

4041
// Setup mcp interrupts
41-
display.pinModeInternal(MCP23017_INT_ADDR, display.mcpRegsInt, touchPadPin, INPUT);
4242
display.setIntOutputInternal(MCP23017_INT_ADDR, display.mcpRegsInt, 1, false, false, HIGH);
43-
display.setIntPinInternal(MCP23017_INT_ADDR, display.mcpRegsInt, touchPadPin, RISING);
43+
display.setIntPinInternal(MCP23017_INT_ADDR, display.mcpRegsInt, PAD1, RISING);
44+
display.setIntPinInternal(MCP23017_INT_ADDR, display.mcpRegsInt, PAD2, RISING);
45+
display.setIntPinInternal(MCP23017_INT_ADDR, display.mcpRegsInt, PAD3, RISING);
4446

4547
++bootCount;
4648

4749
// Our function declared below
4850
displayInfo();
4951

50-
// Go to sleep for TIME_TO_SLEEP seconds, but also enable wake up from gpio 34
51-
// Gpio 34 is where the mcp interrupt is connected, check
52-
// https://github.com/e-radionicacom/Inkplate-6-hardware/blob/master/Schematics%2C%20Gerber%2C%20BOM/Inkplate6%20Schematics.pdf
53-
// for more detail
52+
// Go to sleep for TIME_TO_SLEEP seconds
5453
esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);
55-
esp_sleep_enable_ext0_wakeup(GPIO_NUM_34, 1);
5654

5755
// Enable wakup from deep sleep on gpio 36
5856
esp_sleep_enable_ext1_wakeup((1ULL << 36), ESP_EXT1_WAKEUP_ALL_LOW);

examples/Inkplate5/Advanced_Inkplate_Features/Inkplate_Touchpads/Inkplate_Touchpads.ino

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
1515
In this example, if you touch first pad, ti will decrese number showed on screen, if you touch thirs touch pad,
1616
it will increase the number, if you touch second touchpad, it will reset number to zero.
17-
18-
NOTE: You can not use touch pads when enclosure is fitted on the Inkplate - they are not that sensitive!
17+
Though with a bit of hacking you can get them to work!
1918
2019
Want to learn more about Inkplate? Visit www.inkplate.io
2120
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/

examples/Inkplate5/Advanced_Inkplate_Features/Inkplate_Wake_Up_On_Touchpads/Inkplate_Wake_Up_On_Touchpads.ino

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@
2424
// Time ESP32 will go to sleep (in seconds)
2525
#define TIME_TO_SLEEP 30
2626

27+
// bitmask for GPIO_34 which is connected to MCP INTB
28+
#define TOUCHPAD_WAKE_MASK (int64_t(1) << GPIO_NUM_34)
29+
2730
// Initiate Inkplate object
2831
Inkplate display(INKPLATE_1BIT);
2932

30-
byte touchPadPin = 10;
31-
3233
// Store int in rtc data, to remain persistent during deep sleep
3334
RTC_DATA_ATTR int bootCount = 0;
3435

@@ -38,21 +39,18 @@ void setup()
3839
display.begin();
3940

4041
// Setup mcp interrupts
41-
display.pinModeInternal(MCP23017_INT_ADDR, display.mcpRegsInt, touchPadPin, INPUT);
4242
display.setIntOutputInternal(MCP23017_INT_ADDR, display.mcpRegsInt, 1, false, false, HIGH);
43-
display.setIntPinInternal(MCP23017_INT_ADDR, display.mcpRegsInt, touchPadPin, RISING);
43+
display.setIntPinInternal(MCP23017_INT_ADDR, display.mcpRegsInt, PAD1, RISING);
44+
display.setIntPinInternal(MCP23017_INT_ADDR, display.mcpRegsInt, PAD2, RISING);
45+
display.setIntPinInternal(MCP23017_INT_ADDR, display.mcpRegsInt, PAD3, RISING);
4446

4547
++bootCount;
4648

4749
// Our function declared below
4850
displayInfo();
4951

50-
// Go to sleep for TIME_TO_SLEEP seconds, but also enable wake up from gpio 34
51-
// Gpio 34 is where the mcp interrupt is connected, check
52-
// https://github.com/e-radionicacom/Inkplate-6-hardware/blob/master/Schematics%2C%20Gerber%2C%20BOM/Inkplate6%20Schematics.pdf
53-
// for more detail
52+
// Go to sleep for TIME_TO_SLEEP seconds
5453
esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);
55-
esp_sleep_enable_ext0_wakeup(GPIO_NUM_34, 1);
5654

5755
// GPIO 36 is where the wake up button is connected
5856
esp_sleep_enable_ext1_wakeup((1ULL << 36), ESP_EXT1_WAKEUP_ALL_LOW);

examples/Inkplate6/Advanced_Inkplate_Features/Inkplate_Touchpads/Inkplate_Touchpads.ino

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
In this example, if you touch first pad, ti will decrese number showed on screen, if you touch thirs touch pad,
1616
it will increase the number, if you touch second touchpad, it will reset number to zero.
1717
18-
NOTE: You can not use touch pads when enclosure is fitted on the Inkplate - they are not that sensitive!
19-
2018
Want to learn more about Inkplate? Visit www.inkplate.io
2119
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
2220
15 July 2020 by e-radionica.com

examples/Inkplate6/Advanced_Inkplate_Features/Inkplate_Wake_Up_On_Touchpads/Inkplate_Wake_Up_On_Touchpads.ino

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@
2424
// Time ESP32 will go to sleep (in seconds)
2525
#define TIME_TO_SLEEP 30
2626

27+
// bitmask for GPIO_34 which is connected to MCP INTB
28+
#define TOUCHPAD_WAKE_MASK (int64_t(1) << GPIO_NUM_34)
29+
2730
// Initiate Inkplate object
2831
Inkplate display(INKPLATE_1BIT);
2932

30-
byte touchPadPin = PAD1;
31-
3233
// Store int in rtc data, to remain persistent during deep sleep
3334
RTC_DATA_ATTR int bootCount = 0;
3435

@@ -47,12 +48,11 @@ void setup()
4748
// Our function declared below
4849
displayInfo();
4950

50-
// Go to sleep for TIME_TO_SLEEP seconds, but also enable wake up from gpio 34
51-
// Gpio 34 is where the mcp interrupt is connected, check
52-
// https://github.com/e-radionicacom/Inkplate-6-hardware/blob/master/Schematics%2C%20Gerber%2C%20BOM/Inkplate6%20Schematics.pdf
53-
// for more detail
51+
// Go to sleep for TIME_TO_SLEEP seconds
5452
esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);
55-
esp_sleep_enable_ext0_wakeup(GPIO_NUM_34, 1);
53+
54+
// enable wake from MCP port expander on gpio 34
55+
esp_sleep_enable_ext1_wakeup(TOUCHPAD_WAKE_MASK, ESP_EXT1_WAKEUP_ANY_HIGH);
5656

5757
// Go to sleep
5858
esp_deep_sleep_start();

examples/Inkplate6COLOR/Advanced_Inkplate_Features/Inkplate_Touchpads/Inkplate_Touchpads.ino

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
In this example, if you touch first pad, ti will decrese number showed on screen, if you touch thirs touch pad,
1616
it will increase the number, if you touch second touchpad, it will reset number to zero.
1717
18-
NOTE: You can not use touch pads when enclosure is fitted on the Inkplate - they are not that sensitive!
19-
2018
Want to learn more about Inkplate? Visit www.inkplate.io
2119
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
2220
15 July 2020 by e-radionica.com
@@ -35,9 +33,9 @@ int n = 0; // Variable that keeps track on how many times display is partia
3533
void setup()
3634
{
3735
Serial.begin(115200);
38-
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
39-
display.clearDisplay(); // Clear frame buffer of display
40-
display.display(); // Put clear image on display
36+
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
37+
display.clearDisplay(); // Clear frame buffer of display
38+
display.display(); // Put clear image on display
4139

4240
display.setTextColor(INKPLATE_BLACK);
4341
display.setCursor(10, 10);

examples/Inkplate6COLOR/Advanced_Inkplate_Features/Inkplate_Wake_Up_On_Touchpads/Inkplate_Wake_Up_On_Touchpads.ino

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@
2424
// Time ESP32 will go to sleep (in seconds)
2525
#define TIME_TO_SLEEP 30
2626

27+
// bitmask for GPIO_34 which is connected to MCP INTB
28+
#define TOUCHPAD_WAKE_MASK (int64_t(1)<<GPIO_NUM_34)
29+
2730
// Initiate Inkplate object
2831
Inkplate display;
2932

30-
byte touchPadPin = PAD1;
31-
3233
// Store int in rtc data, to remain persistent during deep sleep
3334
RTC_DATA_ATTR int bootCount = 0;
3435

@@ -38,24 +39,24 @@ void setup()
3839
display.begin();
3940

4041
// Setup mcp interrupts
41-
display.pinModeInternal(MCP23017_INT_ADDR, display.mcpRegsInt, touchPadPin, INPUT);
4242
display.setIntOutput(1, false, false, HIGH);
43-
display.setIntPin(touchPadPin, RISING);
43+
display.setIntPin(PAD1, RISING);
44+
display.setIntPin(PAD2, RISING);
45+
display.setIntPin(PAD3, RISING);
4446

4547
++bootCount;
4648

4749
// Our function declared below
4850
displayInfo();
4951

50-
// Go to sleep for TIME_TO_SLEEP seconds, but also enable wake up from gpio 34
51-
// Gpio 34 is where the mcp interrupt is connected, check
52-
// https://github.com/e-radionicacom/Inkplate-6-hardware/blob/master/Schematics%2C%20Gerber%2C%20BOM/Inkplate6%20Schematics.pdf
53-
// for more detail
52+
// Go to sleep for TIME_TO_SLEEP seconds
5453
esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);
55-
esp_sleep_enable_ext0_wakeup(GPIO_NUM_34, 1);
5654

57-
// Enable wakup from deep sleep on gpio 36
58-
esp_sleep_enable_ext0_wakeup(GPIO_NUM_36, 0);
55+
// Enable wakeup from deep sleep on gpio 36 (wake button)
56+
esp_sleep_enable_ext0_wakeup(GPIO_NUM_36, LOW);
57+
58+
// enable wake from MCP port expander on gpio 34
59+
esp_sleep_enable_ext1_wakeup(TOUCHPAD_WAKE_MASK, ESP_EXT1_WAKEUP_ANY_HIGH);
5960

6061
// Go to sleep
6162
esp_deep_sleep_start();

examples/Inkplate6PLUS/Advanced_Inkplate_Features/Inkplate_Wake_up_on_touchscreen/Inkplate_Wake_up_on_touchscreen.ino

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@
2525
// Time ESP32 will go to sleep (in seconds)
2626
#define TIME_TO_SLEEP 30
2727

28+
// bitmask for GPIO_34 which is connected to MCP INTB
29+
#define TOUCHPAD_WAKE_MASK (int64_t(1) << GPIO_NUM_34)
30+
2831
// Initiate Inkplate object
2932
Inkplate display(INKPLATE_1BIT);
3033

31-
byte touchPadPin = PAD1;
32-
3334
// Store int in rtc data, to remain persistent during deep sleep
3435
RTC_DATA_ATTR int bootCount = 0;
3536

@@ -39,9 +40,23 @@ void setup()
3940
display.begin();
4041

4142
// Setup mcp interrupts
42-
display.pinModeInternal(MCP23017_INT_ADDR, display.mcpRegsInt, touchPadPin, INPUT);
4343
display.setIntOutput(1, false, false, HIGH);
44-
display.setIntPin(touchPadPin, RISING);
44+
display.setIntPin(PAD1, RISING);
45+
display.setIntPin(PAD2, RISING);
46+
display.setIntPin(PAD3, RISING);
47+
48+
49+
// Init touchscreen and power it on after init (send false as argument to put it in deep sleep right after init)
50+
if (display.tsInit(true))
51+
{
52+
Serial.println("Touchscreen init ok");
53+
}
54+
else
55+
{
56+
Serial.println("Touchscreen init fail");
57+
while (true)
58+
;
59+
}
4560

4661
// Init touchscreen and power it on after init (send false as argument to put it in deep sleep right after init)
4762
if (display.tsInit(true))
@@ -60,13 +75,14 @@ void setup()
6075
// Our function declared below
6176
displayInfo();
6277

63-
// Go to sleep for TIME_TO_SLEEP seconds.
78+
// Go to sleep for TIME_TO_SLEEP seconds
6479
esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);
6580

66-
// Enable wake up from deep sleep on gpio 36 (wake up button and Touch INT pin), check
67-
// https://github.com/e-radionicacom/Inkplate-6PLUS-Hardware/blob/main/Schematics%2C%20Gerber%2C%20BOM/v1.0/Inkplate%206PLUS%20Schematics%20v1.0.pdf
68-
// for more detail
69-
esp_sleep_enable_ext0_wakeup(GPIO_NUM_36, 0);
81+
// Enable wakeup from deep sleep on gpio 36 (wake button)
82+
esp_sleep_enable_ext0_wakeup(GPIO_NUM_36, LOW);
83+
84+
// enable wake from MCP port expander on gpio 34
85+
esp_sleep_enable_ext1_wakeup(TOUCHPAD_WAKE_MASK, ESP_EXT1_WAKEUP_ANY_HIGH);
7086

7187
// Go to sleep
7288
esp_deep_sleep_start();

src/boards/Inkplate10.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ bool Inkplate::begin(uint8_t lightWaveform)
4040
if (lightWaveform)
4141
{
4242
_useLightMode = 1;
43-
uint8_t alternateWaveform[8][9] = WAVEFORM3BIT_LIGHT;
43+
uint8_t alternateWaveform[8][8] = WAVEFORM3BIT_LIGHT;
4444
memcpy(waveform3Bit, alternateWaveform, sizeof(waveform3Bit));
4545
}
4646
if (_beginDone == 1)

0 commit comments

Comments
 (0)