Closed tedtms closed 2 years ago
I followed the exception stack to lines 188 - 207 of esp8266-weather-station-color.ino, which contain the functions for touchscreen calibration. Since calibration of the touchscreen doesn't affect any of the weather-related features, I commented out those lines for testing purposes:
#ifdef HAVE_TOUCHPAD
//SPIFFS.remove("/calibration.txt");
//boolean isCalibrationAvailable = touchController.loadCalibration();
//if (!isCalibrationAvailable) {
// Serial.println("Calibration not available");
// touchController.startCalibration(&calibration);
// while (!touchController.isCalibrationFinished()) {
// gfx.fillBuffer(0);
// gfx.setColor(MINI_YELLOW);
// gfx.setTextAlignment(TEXT_ALIGN_CENTER);
// gfx.drawString(120, 160, "Please calibrate\ntouch screen by\ntouch point");
// touchController.continueCalibration();
// gfx.commit();
// yield();
// }
// touchController.saveCalibration();
//} else {
// Serial.println("Touchscreen calibrated");
//}
#endif
Then I recompiled and uploaded. As expected, there was no exception thrown and the TFT showed (blank) weather data immediately after connecting to WiFi. Unfortunately I'm no developer and am unable to figure out why the touchscreen calibration fails, but I expect it may be related to being (un)able to store calibration.txt after the user taps the two calibration dots.
If you're following the Adafruit tutorial you are effectively using their forked code from https://github.com/adafruit/esp8266-weather-station-color/ -> closing
Yep, sorry, I just realized that and came here to close it. Looks like they have an open issue for this problem already. Thanks!
8<------------------------ BUG REPORT -----------------------------------------
Expected behavior
System should boot, prompt for calibration once, and then proceed with displaying the expected weather data.
Actual behavior
When booting, the Featherwing touchscreen shows the connection attempt to my WiFi, which is successful (verified DHCP issued by my router by checking leases). Then it shows a screen saying "Please calibrate touch screen by touch point" along with a white dot. Pressing the dot and the one that follows after works fine, but then an exception gets thrown and the system reboots, re-connecting to WiFi and again asking for calibration.
Serial output (WiFi SSID and pass obfuscated)
Exception Decoder Result
Weather Station Color version
Master branch, downloaded via Adafruit guide link: https://learn.adafruit.com/wifi-weather-station-with-tft-display/software
Hardware
Feather HUZZAH with Featherwing TFT display. For testing, I'm using USB power instead of a LiPo battery.
8<------------------------ END BUG REPORT -------------------------------------