Skip to content

Commit 5d9bf7e

Browse files
committed
Merge branch 'dev'
2 parents 258ab80 + c6eb1fd commit 5d9bf7e

File tree

42 files changed

+2622
-1662
lines changed

Some content is hidden

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

42 files changed

+2622
-1662
lines changed

examples/Inkplate10/Advanced_Inkplate_Features/Inkplate_RTC_Alarm_Example/Inkplate_RTC_Alarm_Example.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void setup()
5959
int n = 0;
6060
void loop()
6161
{
62-
display.rtcReadTime(); // Get the time and date from RTC
62+
display.rtcGetRtcData(); // Get the time and date from RTC
6363
seconds = display.rtcGetSecond(); // Store senconds in a variable
6464
minutes = display.rtcGetMinute(); // Store minutes in a variable
6565
hour = display.rtcGetHour(); // Store hours in a variable

examples/Inkplate10/Advanced_Inkplate_Features/Inkplate_RTC_Basic_Example/Inkplate_RTC_Basic_Example.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void setup()
4949
int n = 0;
5050
void loop()
5151
{
52-
display.rtcReadTime(); // Get the time and date from RTC
52+
display.rtcGetRtcData(); // Get the time and date from RTC
5353
seconds = display.rtcGetSecond(); // Store senconds in a variable
5454
minutes = display.rtcGetMinute(); // Store minutes in a variable
5555
hour = display.rtcGetHour(); // Store hours in a variable

examples/Inkplate10/Advanced_Inkplate_Features/Inkplate_RTC_Interrupt_Alarm_Example/Inkplate_RTC_Interrupt_Alarm_Example.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void loop()
5555
{
5656
display.clearDisplay(); // Clear frame buffer of display
5757
display.setCursor(100, 100); // Set position of the text
58-
display.rtcReadTime(); // Get the time and date from RTC
58+
display.rtcGetRtcData(); // Get the time and date from RTC
5959

6060
// Print the time on screen
6161
printTime(display.rtcGetHour(), display.rtcGetMinute(), display.rtcGetSecond(), display.rtcGetDay(), display.rtcGetWeekday(), display.rtcGetMonth(), display.rtcGetYear());

examples/Inkplate10/Advanced_Inkplate_Features/Inkplate_RTC_Timer_Example/Inkplate_RTC_Timer_Example.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void setup()
6969
int n = 0;
7070
void loop()
7171
{
72-
display.rtcReadTime(); // Get the time and date from RTC
72+
display.rtcGetRtcData(); // Get the time and date from RTC
7373
seconds = display.rtcGetSecond(); // Store senconds in a variable
7474
minutes = display.rtcGetMinute(); // Store minutes in a variable
7575
hour = display.rtcGetHour(); // Store hours in a variable

examples/Inkplate10/Advanced_Inkplate_Features/Inkplate_Wake_Up_On_Touchpads/Inkplate_Wake_Up_On_Touchpads.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void setup()
5555
esp_sleep_enable_ext0_wakeup(GPIO_NUM_34, 1);
5656

5757
// Enable wakup from deep sleep on gpio 36
58-
esp_sleep_enable_ext0_wakeup(GPIO_NUM_36, 0);
58+
esp_sleep_enable_ext1_wakeup((1ULL << 36), ESP_EXT1_WAKEUP_ALL_LOW);
5959

6060
// Go to sleep
6161
esp_deep_sleep_start();
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*
2+
Inkplate_Clear example for e-radionica.com Inkplate 10
3+
For this example you will need only USB cable and Inkplate 10.
4+
Select "Inkplate 10(ESP32)" from Tools -> Board menu.
5+
Don't have "Inkplate 10(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 try to remove heavy burn-in visible on the panel.
9+
Set number of refresh / clear cycles and upload the program.
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+
12 January 2022 by e-radionica.com
14+
*/
15+
16+
// Next 3 lines are a precaution, you can ignore those, and the example would also work without them
17+
#ifndef ARDUINO_INKPLATE10
18+
#error "Wrong board selection for this example, please select Inkplate 10 in the boards menu."
19+
#endif
20+
21+
#include "Inkplate.h" //Include Inkplate library to the sketch
22+
Inkplate display(INKPLATE_1BIT); // Create object on Inkplate library and set library to work in monochorme mode
23+
24+
// Nubmer of clear cycles.
25+
#define CLEAR_CYCLES 20
26+
27+
// Delay between clear cycles (in milliseconds)
28+
#define CYCLES_DELAY 5000
29+
30+
void setup()
31+
{
32+
display.begin(); // Init library (you should call this function ONLY ONCE)
33+
display.clearDisplay(); // Clear any data that may have been in (software) frame buffer.
34+
35+
display.einkOn(); // Power up epaper power supply
36+
37+
int cycles = CLEAR_CYCLES;
38+
39+
// Clean it by writing clear sequence to the panel.
40+
while (cycles)
41+
{
42+
display.clean(1, 12);
43+
display.clean(2, 1);
44+
display.clean(0, 9);
45+
display.clean(2, 1);
46+
display.clean(1, 12);
47+
display.clean(2, 1);
48+
display.clean(0, 9);
49+
display.clean(2, 1);
50+
51+
delay(CYCLES_DELAY);
52+
cycles--;
53+
}
54+
55+
// Print text when clearing is done.
56+
display.setTextSize(4);
57+
display.setCursor(100, 100);
58+
display.print("Clearing done.");
59+
display.display();
60+
}
61+
62+
void loop()
63+
{
64+
// Empty...
65+
}

examples/Inkplate10/Others/Inkplate_Factory_Programming_VCOM/Inkplate_Factory_Programming_VCOM.ino

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ int EEPROMaddress = 0;
1313
char commandBuffer[BUFFER_SIZE + 1];
1414
char strTemp[2001];
1515

16+
const char sdCardTestStringLength = 100;
17+
const char *testString = {"This is some test string..."};
18+
1619
// Internal registers of MCP
1720
uint8_t mcpRegsInt[22];
1821

@@ -26,6 +29,7 @@ void setup()
2629

2730
if (EEPROM.read(EEPROMaddress) != 170)
2831
{
32+
microSDCardTest();
2933
display.pinModeInternal(MCP23017_INT_ADDR, mcpRegsInt, 6, INPUT_PULLUP);
3034
writeVCOMToEEPROM(vcomVoltage);
3135
EEPROM.write(EEPROMaddress, 170);
@@ -500,3 +504,62 @@ void writeVCOMToEEPROM(double v)
500504
Serial.println("\nVCOM EEPROM PROGRAMMING OK\n");
501505
}
502506
}
507+
508+
int checkMicroSDCard()
509+
{
510+
int sdInitOk = 0;
511+
sdInitOk = display.sdCardInit();
512+
513+
if (sdInitOk)
514+
{
515+
File file;
516+
517+
if (file.open("/testFile.txt", O_CREAT | O_RDWR))
518+
{
519+
file.print(testString);
520+
file.close();
521+
}
522+
else
523+
{
524+
return 0;
525+
}
526+
527+
delay(250);
528+
529+
if (file.open("/testFile.txt", O_RDWR))
530+
{
531+
char sdCardString[sdCardTestStringLength];
532+
file.read(sdCardString, sizeof(sdCardString));
533+
sdCardString[file.fileSize()] = 0;
534+
int stringCompare = strcmp(testString, sdCardString);
535+
file.remove();
536+
file.close();
537+
if (stringCompare != 0)
538+
return 0;
539+
}
540+
else
541+
{
542+
return 0;
543+
}
544+
}
545+
else
546+
{
547+
return 0;
548+
}
549+
return 1;
550+
}
551+
552+
void microSDCardTest()
553+
{
554+
display.setTextSize(5);
555+
display.setCursor(100, 100);
556+
display.print("microSD card slot test ");
557+
558+
if (!checkMicroSDCard())
559+
{
560+
display.print("FAIL!");
561+
display.display();
562+
while(1);
563+
}
564+
display.clearDisplay();
565+
}

examples/Inkplate5/Advanced_Inkplate_Features/Inkplate_RTC_Alarm_Example/Inkplate_RTC_Alarm_Example.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void setup()
5959
int n = 0;
6060
void loop()
6161
{
62-
display.rtcReadTime(); // Get the time and date from RTC
62+
display.rtcGetRtcData(); // Get the time and date from RTC
6363
seconds = display.rtcGetSecond(); // Store senconds in a variable
6464
minutes = display.rtcGetMinute(); // Store minutes in a variable
6565
hour = display.rtcGetHour(); // Store hours in a variable

examples/Inkplate5/Advanced_Inkplate_Features/Inkplate_RTC_Basic_Example/Inkplate_RTC_Basic_Example.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void setup()
4949
int n = 0;
5050
void loop()
5151
{
52-
display.rtcReadTime(); // Get the time and date from RTC
52+
display.rtcGetRtcData(); // Get the time and date from RTC
5353
seconds = display.rtcGetSecond(); // Store senconds in a variable
5454
minutes = display.rtcGetMinute(); // Store minutes in a variable
5555
hour = display.rtcGetHour(); // Store hours in a variable

examples/Inkplate5/Advanced_Inkplate_Features/Inkplate_RTC_Interrupt_Alarm_Example/Inkplate_RTC_Interrupt_Alarm_Example.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void loop()
5555
{
5656
display.clearDisplay(); // Clear frame buffer of display
5757
display.setCursor(100, 100); // Set position of the text
58-
display.rtcReadTime(); // Get the time and date from RTC
58+
display.rtcGetRtcData(); // Get the time and date from RTC
5959

6060
// Print the time on screen
6161
printTime(display.rtcGetHour(), display.rtcGetMinute(), display.rtcGetSecond(), display.rtcGetDay(), display.rtcGetWeekday(), display.rtcGetMonth(), display.rtcGetYear());

0 commit comments

Comments
 (0)