0 votes
in Touch Interface by (160 points)
edited by

Two weeks ago i received your interesting kit for weather color, after ISram issue, i read this support foroum and follow all recommendations using D1 2.4.2 core without success,  i'm in trouble  because the wemos d1 pro mini  included in the kit, for me didn't have really 16Mb, but only 4 Mb, and only if i choose Lolin D1 Mini R1 D1 (pay attention, not PRO) my arduino IDE 1.8.1 on windows10 compiles, and  seems  the Spiffs format say apparently ok. But i was never able to see touchscreen working yet
Now the question is that  after upload sketch  i see for  one second the Thing Pulse connect to wifi page,  then appear a white page and loop continously between wifi connect page and a blank page.

Tried also to modify XPT2046_Touchscreen.cpp and upgrade to 2.5.2 core as described on your support forum https://support.thingpulse.com/1040/have-an-error-isr-not-in-iram?show=1060#a1060

#ifdef ESP32
void IRAM_ATTR isrPin( void )
#else
ICACHE_RAM_ATTR void isrPin( void )
#endif


But as you can see on the attached log, it seems that after apparently right download pages from openweather, the cpu goes in crash and reboot and reboot again with the following final information extracted from the log:

Connecting to WiFi FRITZ!Box 7490/xxxxxxxxxx
.........Connected...Initializing touch screen...
Mounting file system...
SPIFFS opened: OK

Current time: 1575524431

DST Rules Updated:
DST Start: Sun Mar 31 02:00:00 2019
DST End:   Sun Oct 27 02:00:00 2019

Time difference for DST: 3600
Getting url: http://api.openweathermap.org/data/2.5/weather?id=6539761&appid=a45xxxxxxxxxxxxxxxxx&units=metric&lang=en
[HTTP] GET...
[HTTP] GET... code: 200
start document
Getting url: http://api.openweathermap.org/data/2.5/forecast?id=6539761&appid=a45xxxxxxxxxxxxxxxxxx&units=metric&lang=en
[HTTP] GET...
[HTTP] GET... code: 200
start document
Free mem: 24304

Exception (0):
epc1=0x4023e517 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

>>>stack>>>


.........................................

ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v8b899c12
~ld
15
Stupidly i soldered the wemos D1 to the board, so i'm quite lazy to desolder it and replace with one of my wemos d1 mini, (isn't first time i work with wemos, and never ancountered problems with spiffs and touchscreen as with this).
So i kindly ask an help to solve quickly this issue, knowing really step by step how configure and programming the D1 Pro provided in the kit and second question, why you declare on the kit an esp8266 wemos D1 mini Pro 16Mb, when it is only 4MB and on your docs, guide etc, you mention only D1 Mini 4MB for this beautiful project? thanks in advance

by (19.9k points)
Kudos for trying to solve this on your own and searching in our forum! Let me address the questions one by one:

4MB vs 16MB: the factory put the wrong sticker onto the box, it's not a D1 mini Pro. If you work through our tutorial it correctly describes all the settings: https://docs.thingpulse.com/guides/wifi-color-display-kit/#select-flash-mode-and-flash-size

ESP8266 Arduino core 2.4.2: as per https://docs.thingpulse.com/guides/wifi-color-display-kit/#install-the-esp8266-toolchain you should be using ESP8266 Arduino core 2.4.2. The issue is caused by the XPT2046 touch library which doesn't support newer versions yet. Please leave a comment with https://github.com/PaulStoffregen/XPT2046_Touchscreen/pull/24 to motivate the author to finally release the fix that he already committed months ago.

As to the final problem:
- Can you rule out bad solder joints? Can you test connectivity as per the wiring diagram at https://docs.thingpulse.com/specs/wifi-color-display-kit/#wiring
- Please install the exception decoder to find the line of code that causes the crash: https://github.com/me-no-dev/EspExceptionDecoder

1 Answer

0 votes
by (160 points)

hello @all. resoldered all joint, reinstalled all software stack on another PC with arduino ide 1.8.8, installes EspExceptionDecoder (included missing xtensa elf---xxx--gdb-something missing) but same result, loop and loop again and never see nothing but the first connecting page. below the stack trace decoded, remain to verify all wiring connection and try to install libraries manually from github removing them from library manager as read in another thread in this forum for the same product :

let me know, thanks 

Decoding stack results
0x40222402: ip4_input at core/ipv4/ip4.c line 470
0x40222402: ip4_input at core/ipv4/ip4.c line 470
0x40222402: ip4_input at core/ipv4/ip4.c line 470
0x40222402: ip4_input at core/ipv4/ip4.c line 470
0x402223fd: ip4_input at core/ipv4/ip4.c line 466
0x401004e4: malloc at C:\Users\gianl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\umm_malloc\umm_malloc.c line 1668
0x401004e4: malloc at C:\Users\gianl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\umm_malloc\umm_malloc.c line 1668
0x4022238c: ip4_input at core/ipv4/ip4.c line 445
0x4021bc78: ethernet_input_LWIP2 at netif/ethernet.c line 182
0x4021bab3: esp2glue_ethernet_input at glue-lwip/lwip-git.c line 439
0x402390e6: ethernet_input at glue-esp/lwip-esp.c line 363
0x402390f7: ethernet_input at glue-esp/lwip-esp.c line 371
0x4021b621: glue2esp_linkoutput at glue-esp/lwip-esp.c line 299
0x401004ba: _umm_malloc at C:\Users\gianl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\umm_malloc\umm_malloc.c line 1470
0x40106721: interrupt_handler at C:\Users\gianl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\core_esp8266_wiring_digital.c line 166
0x40106650: interrupt_handler at C:\Users\gianl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\core_esp8266_wiring_digital.c line 130
0x40106721: interrupt_handler at C:\Users\gianl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\core_esp8266_wiring_digital.c line 166
0x40106650: interrupt_handler at C:\Users\gianl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\core_esp8266_wiring_digital.c line 130
0x40106721: interrupt_handler at C:\Users\gianl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\core_esp8266_wiring_digital.c line 166
0x40106650: interrupt_handler at C:\Users\gianl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\core_esp8266_wiring_digital.c line 130
0x4020a955: SPIClass::writeBytes_(unsigned char const*, unsigned char) at C:\Users\gianl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\SPI\SPI.cpp line 432
0x40212d46: pgm_read_byte_inlined(void const*) at C:\Users\gianl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266/pgmspace.h line 107
0x4020e9c4: MiniGrafx::readFontData(char const*, unsigned int) at C:\Users\gianl\Documents\Arduino\libraries\Mini_Grafx\src\MiniGrafx.cpp line 389
0x402143cd: _printf_common at ../../../.././newlib/libc/stdio/nano-vfprintf_i.c line 94
0x40218b78: _svfprintf_r at ../../../.././newlib/libc/stdio/nano-vfprintf.c line 641
0x40214de4: sprintf at ../../../.././newlib/libc/stdio/sprintf.c line 646
0x402118bc: esp_yield() at C:\Users\gianl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\core_esp8266_main.cpp line 91
0x40211976: __yield() at C:\Users\gianl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\core_esp8266_main.cpp line 100
0x4020f028: MiniGrafx::drawStringInternal(short, short, char*, unsigned short, unsigned short) at C:\Users\gianl\Documents\Arduino\libraries\Mini_Grafx\src\MiniGrafx.cpp line 510
0x40210bf8: String::invalidate() at C:\Users\gianl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\WString.cpp line 141
0x4020f120: MiniGrafx::drawString(short, short, String) at C:\Users\gianl\Documents\Arduino\libraries\Mini_Grafx\src\MiniGrafx.cpp line 284
0x40210cb9: String::copy(char const*, unsigned int) at C:\Users\gianl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\WString.cpp line 175
0x40208b42: drawForecastDetail(unsigned short, unsigned short, unsigned char) at C:\Users\gianl\Documents\Arduino\esp8266-weather-station-color/esp8266-weather-station-color.ino line 433
0x401006dc: free at C:\Users\gianl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\umm_malloc\umm_malloc.c line 1755
0x4010020c: _umm_free at C:\Users\gianl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\umm_malloc\umm_malloc.c line 1295
0x40208b9c: drawForecast1(MiniGrafx*, CarouselState*, short, short) at C:\Users\gianl\Documents\Arduino\esp8266-weather-station-color/esp8266-weather-station-color.ino line 404
0x4020ddd8: Carousel::drawFrame() at C:\Users\gianl\Documents\Arduino\libraries\Mini_Grafx\src\Carousel.cpp line 332
0x4020900e: drawWifiQuality() at C:\Users\gianl\Documents\Arduino\esp8266-weather-station-color/esp8266-weather-station-color.ino line 524
0x4020e04f: Carousel::tick() at C:\Users\gianl\Documents\Arduino\libraries\Mini_Grafx\src\Carousel.cpp line 241
0x4020e0f2: Carousel::update() at C:\Users\gianl\Documents\Arduino\libraries\Mini_Grafx\src\Carousel.cpp line 204
0x40209c45: loop() at C:\Users\gianl\Documents\Arduino\esp8266-weather-station-color/esp8266-weather-station-color.ino line 231
0x402118dd: esp_schedule() at C:\Users\gianl\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\core_esp8266_main.cpp line 95
by (3.6k points)
Does your router support IP4 many new devices only support IP 6 on my Sky Q router I have thought o enable IP4 support, for example.
by (19.9k points)
@G6EJD I agree, that's the smoking gun here if we look at the stacktrace. However, the output in the original description shows that the device was able to fetch some data from OWM.

Gianluigi, you can test/verify with simple sketches that don't write anything to the display.
by (160 points)
Hello again, after hundreds of test, including perform  a factory reset of the wemos without success, definetely confirm the wemos provided is broken in some part. wathever project i upload, after a while he crash and restart. So with patience i desoldered the broken wemos and replace with one of mine with chip in metallic case (DOIT.AM brand) . This time it works with your recommended stack 2.42 board and so on. A pity the lack of upload image here, by the way take a look https://photos.app.goo.gl/SyNvpKXxAzPt19Vt6
Last problem now is the touch, nothing happens if try to touch every portion of screen, only the led blink. Any suggestion? thanks for your support till now
by (3.6k points)
Do you know the providence of the screen? If purchased from Thingspeak then ok, if not then highly likely it has no touch support fitted, a fact that is well documented.
by (160 points)
Hello G6EJD the screen is included in the original ThingPulse kit bought one month ago. Now the great news! All works like a charm with my mini D1, the issue with the touch has been solved after flashing once the firmware with (Tools -> Erase Flash ->Erase ALL FLASH CONTENTS option on Arduino ide). After restart, program launch touch calibration again and this time it save correctly the coordinates.  Thanks again for support and
I wish you a merry Christmas. bye

Welcome to ThingPulse Q&A, where you can ask questions and receive answers from other members of the community.

https://thingpulse.com

...