ThingPulse / esp8266-weather-station-color

ESP8266 Weather Station in Color using ILI9341 TFT 240x320 display
https://thingpulse.com/product/esp8266-wifi-color-display-kit-2-4/
MIT License
571 stars 222 forks source link

Using without ILI9341, but without touch - permanently switching between 12/24 hour #84

Closed Schawen closed 4 years ago

Schawen commented 6 years ago

Hey, I connected Wemos D1 min Pro to ILI9341 LCD without touch IC. Problem:
The display permanently switches ( two times per sec ) between 12 hour and 24 hour time display. The forecast also gets updated in the same interval.

Is that behaviour a result of the missing touch ic on the back of the display board? How can I avoid this behaviour?

Hope somebody can help ...

G6EJD commented 6 years ago

You've got a non-standard display and so the code is not supported for your configuration. You would need to disable all function calls associated with the touch-panel and would require a considerable amount of work. You could try searching other forums to see if someone has produced a version without the touch panel.

Or you could check out line 37 in Settings.h 37 #define HAVE_TOUCHPAD

Maybe change that to DONOT_HAVE_TOUCHPAD :0

Schawen commented 6 years ago

Thanks for your reply. I previously searched the source code for the defined "HAVE_TOUCHPAD", but it seems that it is not used in the code at all. The Display works fine, even without touch function - except for the permanently switching between 12/24 hour time display.

pierpe83 commented 6 years ago

Comment lines 216 to 224 and after the problem.

amjm22 commented 6 years ago

Attached is the adjusted code that is working. The 12-24 issue is gone.

final_weather.txt

marcelstoer commented 6 years ago

I had a brief look at the diff (would be easier if this were in a PR) and two things look...let's say interesing:

line ~186 (yes, it does compile)

while (!touchController.isCalibrationFinished())
touchController.saveCalibration();
{
  gfx.fillBuffer(0);

line ~220, this is effectively a no-op

if (p.y < 80) {
  IS_STYLE_12HR = IS_STYLE_12HR; // was IS_STYLE_12HR = !IS_STYLE_12HR;
plazmax commented 5 years ago

Attached is the adjusted code that is working. The 12-24 issue is gone.

final_weather.txt

thank you i'll try :)

Perimec commented 5 years ago

Hi, first thanks for the code... however I'm having the same issue even if I have touch screen display. Not sure why. by the way, what can you do with the touch? I have tried and it doesn't do anything... maybe there is the problem.

thanks in advance

TinemChou commented 5 years ago

With a chinese ILI9341 display the touch pad is not working too, i use

#define HAVE_TOUCHPAD in settings.h

to prevent the usage of the touch pad on the source code, for example :

#ifdef HAVE_TOUCHPAD #include "TouchControllerWS.h" #endif

I also simply replace the touch pad functionnality with a push on D3 (with the internal pull-up resistor) and always use 24H hour style.

Dancopy commented 5 years ago

Hey, I connected Wemos D1 min Pro to ILI9341 LCD without touch IC. Problem: The display permanently switches ( two times per sec ) between 12 hour and 24 hour time display. The forecast also gets updated in the same interval.

Is that behaviour a result of the missing touch ic on the back of the display board? How can I avoid this behaviour?

Hope somebody can help ...

Hi Schawen! I have the same problem - did you solve it? If so, can you post the solution? Thanks

Dancopy commented 5 years ago

Attached is the adjusted code that is working. The 12-24 issue is gone. final_weather.txt

thank you i'll try :)

You're showing this error: esp8266-weather-station-color:290:81: error: 'OPEN_WEATHER_MAP_LOCATION' was not declared in this scope

exit status 1 'OPEN_WEATHER_MAP_LOCATION' was not declared in this scope

Dancopy commented 5 years ago

With a chinese ILI9341 display the touch pad is not working too, i use

#define HAVE_TOUCHPAD in settings.h

to prevent the usage of the touch pad on the source code, for example :

#ifdef HAVE_TOUCHPAD #include "TouchControllerWS.h" #endif

I also simply replace the touch pad functionnality with a push on D3 (with the internal pull-up resistor) and always use 24H hour style.

Hi TinemChou, could you kindly explain a little more detail how you did or, post your sketch here and also how you connected the Push Button on the D3 pin? I could not understand correctly; thank you

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.