Customer:
My Inkplate 10 screen turns dark gradually when unplugged. How come? Is this fixable?
Originally submitted via email support on 2 June 2022. Migrated to the forum for community visibility.
Customer:
My Inkplate 10 screen turns dark gradually when unplugged. How come? Is this fixable?
Originally submitted via email support on 2 June 2022. Migrated to the forum for community visibility.
Soldered Support:
The dark image problem is described in this topic: https://forum.e-radionica.com/en/viewtopic.php?f=23&t=407&p=810&hilit=dark#p810
For the difference between pictures from the web and from the SD card, you can upload another waveform. An example waveform is at https://github.com/e-radionicacom/Inkplate-Arduino-library/blob/master/examples/Inkplate10/Others/Inkplate_Wavefrom_EEPROM_Programming/Inkplate_Wavefrom_EEPROM_Programming.ino. The example includes a description of the process for changing the waveform.
Customer:
When trying to upload the waveform code I got these errors:
Arduino: 1.8.19 (Mac OS X), Board: "Inkplate 10 (ESP32), Enabled, Huge APP (3MB No OTA), 240MHz (WiFi/BT), 115200, None"
waveform:44:21: error: aggregate 'waveformData waveformEEPROM' has incomplete type and cannot be defined
struct waveformData waveformEEPROM;
^
/Users/[user]/Dropbox/Mac/Documents/Arduino/waveform/waveform.ino: In function 'void setup()':
waveform:79:33: error: 'INKPLATE10_WAVEFORM1' was not declared in this scope
waveformEEPROM.waveformId = INKPLATE10_WAVEFORM1 + currentWaveform;
^
waveform:81:39: error: 'class Inkplate' has no member named 'calculateChecksum'
waveformEEPROM.checksum = display.calculateChecksum(waveformEEPROM);
^
waveform:82:13: error: 'class Inkplate' has no member named 'burnWaveformToEEPROM'
display.burnWaveformToEEPROM(waveformEEPROM);
^
/Users/[user]/Dropbox/Mac/Documents/Arduino/waveform/waveform.ino: In function 'void showGradient(int)':
waveform:104:13: error: 'class Inkplate' has no member named 'changeWaveform'
display.changeWaveform( );
^
/Users/[user]/Dropbox/Mac/Documents/Arduino/waveform/waveform.ino: At global scope:
waveform:149:17: error: redefinition of 'Inkplate display'
Inkplate display(INKPLATE_3BIT); // Create object on Inkplate library and set library to work in grayscale mode
^
/Users/[user]/Dropbox/Mac/Documents/Arduino/waveform/waveform.ino:26:10: note: 'Inkplate display' previously declared here
Inkplate display(INKPLATE_3BIT); // Create object on Inkplate library and set library to work in grayscale mode
^
waveform:152:23: error: redefinition of 'uint8_t waveform1 '
uint8_t = {{0, 0, 0, 0, 0, 0, 0, 1, 0}, {0, 0, 0, 2, 2, 2, 1, 1, 0}, {0, 0, 2, 1, 1, 2, 2, 1, 0},
^
/Users/[user]/Dropbox/Mac/Documents/Arduino/waveform/waveform.ino:29:9: note: 'uint8_t waveform1 ' previously defined here
uint8_t = {{0, 0, 0, 0, 0, 0, 0, 1, 0}, {0, 0, 0, 2, 2, 2, 1, 1, 0}, {0, 0, 2, 1, 1, 2, 2, 1, 0},
^
waveform:155:23: error: redefinition of 'uint8_t waveform2 '
uint8_t = {{0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 2, 1, 2, 1, 1, 0}, {0, 0, 0, 2, 2, 1, 2, 1, 0},
^
/Users/[user]/Dropbox/Mac/Documents/Arduino/waveform/waveform.ino:32:9: note: 'uint8_t waveform2 ' previously defined here
uint8_t = {{0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 2, 1, 2, 1, 1, 0}, {0, 0, 0, 2, 2, 1, 2, 1, 0},
^
waveform:158:23: error: redefinition of 'uint8_t waveform3 '
uint8_t = {{0, 3, 3, 3, 3, 3, 3, 3, 0}, {0, 1, 2, 1, 1, 2, 2, 1, 0}, {0, 2, 2, 2, 1, 2, 2, 1, 0},
^
/Users/[user]/Dropbox/Mac/Documents/Arduino/waveform/waveform.ino:35:9: note: 'uint8_t waveform3 ' previously defined here
uint8_t = {{0, 3, 3, 3, 3, 3, 3, 3, 0}, {0, 1, 2, 1, 1, 2, 2, 1, 0}, {0, 2, 2, 2, 1, 2, 2, 1, 0},
^
waveform:161:23: error: redefinition of 'uint8_t* waveformList []'
uint8_t *waveformList[] ;
^
/Users/[user]/Dropbox/Mac/Documents/Arduino/waveform/waveform.ino:38:10: note: 'uint8_t* waveformList ' previously defined here
uint8_t *waveformList[] ;
^
waveform:164:9: error: redefinition of 'uint8_t waveformListSize'
uint8_t waveformListSize = (sizeof(waveformList) / sizeof(uint8_t *));
^
/Users/[user]/Dropbox/Mac/Documents/Arduino/waveform/waveform.ino:41:9: note: 'uint8_t waveformListSize' previously defined here
uint8_t waveformListSize = (sizeof(waveformList) / sizeof(uint8_t *));
^
waveform:169:5: error: redefinition of 'int currentWaveform'
int currentWaveform = 0;
^
/Users/[user]/Dropbox/Mac/Documents/Arduino/waveform/waveform.ino:46:5: note: 'int currentWaveform' previously defined here
int currentWaveform = 0;
^
/Users/[user]/Dropbox/Mac/Documents/Arduino/waveform/waveform.ino: In function 'void setup()':
waveform:171:6: error: redefinition of 'void setup()'
void setup()
^
/Users/[user]/Dropbox/Mac/Documents/Arduino/waveform/waveform.ino:48:6: note: 'void setup()' previously defined here
void setup()
^
waveform:202:33: error: 'INKPLATE10_WAVEFORM1' was not declared in this scope
waveformEEPROM.waveformId = INKPLATE10_WAVEFORM1 + currentWaveform;
^
waveform:204:39: error: 'class Inkplate' has no member named 'calculateChecksum'
waveformEEPROM.checksum = display.calculateChecksum(waveformEEPROM);
^
waveform:205:13: error: 'class Inkplate' has no member named 'burnWaveformToEEPROM'
display.burnWaveformToEEPROM(waveformEEPROM);
^
/Users/[user]/Dropbox/Mac/Documents/Arduino/waveform/waveform.ino: In function 'void loop()':
waveform:216:6: error: redefinition of 'void loop()'
void loop()
^
/Users/[user]/Dropbox/Mac/Documents/Arduino/waveform/waveform.ino:93:6: note: 'void loop()' previously defined here
void loop()
^
/Users/[user]/Dropbox/Mac/Documents/Arduino/waveform/waveform.ino: In function 'void showGradient(int)':
waveform:222:6: error: redefinition of 'void showGradient(int)'
void showGradient(int _selected)
^
/Users/[user]/Dropbox/Mac/Documents/Arduino/waveform/waveform.ino:99:6: note: 'void showGradient(int)' previously defined here
void showGradient(int _selected)
^
waveform:227:13: error: 'class Inkplate' has no member named 'changeWaveform'
display.changeWaveform( );
^
Multiple libraries were found for "Inkplate.h"
Used: /Users/[user]/Dropbox/Mac/Documents/Arduino/libraries/Inkplate-Arduino-library-master
Not used: /Users/[user]/Dropbox/Mac/Documents/Arduino/libraries/InkplateLibrary
Multiple libraries were found for "WiFiClient.h"
Used: /Users/[user]/Library/Arduino15/packages/Croduino_Boards/hardware/Inkplate/1.0.1/libraries/WiFi
Not used: /Applications/Arduino.app/Contents/Java/libraries/WiFi
exit status 1
aggregate 'waveformData waveformEEPROM' has incomplete type and cannot be defined
Customer:
I was able to change the waveform! But now I’m getting problems updating the board. Sometimes I get an error message, most of the time without one. The screen flashes white and black repeatedly, and it takes 10-15 tries to successfully upload code. It wasn’t like this from the beginning.
Soldered Support:
I tested with V5.7.0 and everything works. We don’t have V7.0.0 yet.
When you upload the code, do you see a picture or does the Inkplate only flash? Can you send the error message you get and also the error message from the serial monitor? Please test Inkplate with a better cable, and for the upload problem try to reduce the upload speed (you have an option for upload speed in tools).
Customer:
The error sometimes appears:
Arduino: 1.8.19 (Mac OS X), Board: "Inkplate 10 (ESP32), Enabled, Huge APP (3MB No OTA), 240MHz (WiFi/BT), 115200, None"
Sketch uses 999090 bytes (31%) of program storage space. Maximum is 3145728 bytes.
Global variables use 57628 bytes (17%) of dynamic memory, leaving 270052 bytes for local variables. Maximum is 327680 bytes.
An error occurred while uploading the sketch
Traceback (most recent call last):
esptool.py v3.0-dev
File "esptool.py", line 3969, in
File "esptool.py", line 3962, in _main
File "esptool.py", line 3551, in main
File "esptool.py", line 271, in __init__
File "serial/__init__.py", line 88, in serial_for_url
File "serial/serialposix.py", line 268, in open
serial.serialutil.SerialException: [Errno 2] could not open port /dev/cu.usbserial-110: [Errno 2] No such file or directory: '/dev/cu.usbserial-110'
Serial port /dev/cu.usbserial-110
Failed to execute script esptool
When upload doesn’t show an error but the screen blinks (no logo, only white and black), the monitor shows (for example):
16:45:29.017 -> rst:0xc (SW_CPU_RESET),boot:0x32 (SPI_FAST_FLASH_BOOT)
16:45:29.017 -> configsip: 0, SPIWP:0xee
16:45:29.017 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
16:45:29.050 -> mode:DIO, clock div:2
16:45:29.050 -> load:0x3fff0018,len:4
16:45:29.050 -> load:0x3fff001c,len:1100
16:45:29.050 -> load: ,len:10900
16:45:29.050 -> load: ,len:6360
16:45:29.050 -> entry 0x400806b4
This repeats again and again. Upload speed is 115200 and I replaced the cable with a new one.
Soldered Support:
You have a problem with the code because the ESP32 has SW reset. Can you send your code and describe what you want to do? When we look at the code we may find where the bug is.
Customer:
The code is attached. It’s simple code that reads an image from a URL and from SD. I don’t think the code is the problem because it sometimes succeeds and sometimes fails.
Attachment omitted in migration: inkplate10_SD_WIFI_7.7_c.ino
Soldered Support:
I tested your code and got the same problem. The ESP32 constantly has SW reset. I found the problem in your code: you have incorrectly handled the WiFi connection. When connecting to WiFi, you can’t use an if loop which only checks the statement and then the code goes to the next line. You must use a while loop which waits until WiFi is connected. In your code, you wait only 2 seconds to connect to WiFi and then go to download an image from the internet. This code works when the ESP32 manages to connect to WiFi, but when the ESP32 fails to connect it resets because it can’t download the image.
You can look at the examples for WiFi and SD and use the code for initializing WiFi and SD card from there.