logo elektroda
logo elektroda
X
logo elektroda

Touch does not work in the weather station on ESP8266 with ILI9341

MaciejWarloch 1959 18
Best answers

Why does the touch panel on my ESP8266 weather station with an ILI9341 display only light the LED instead of changing the screen, and is the Wemos D1 board too weak for it?

The Wemos D1 is probably not too weak; the more likely problem is incorrect touch wiring/pin mapping or missing touch calibration, not processor power [#18368536][#18379827] The ILI9341 module uses two SPI interfaces, one for the display and one for the touch controller, and the touch should signal the ESP through the IRQ pin so the firmware can read the touch event [#18368536] If the LED reacts when you touch the screen, the touch connection is probably at least partially correct, so check whether the project expects a calibration step [#18379827] Also make sure you use the exact board type and GPIO mapping expected by the project, because D0/D1/etc. labels can differ between NodeMCU and Wemos boards [#18368536] If your module is not identical to the one in the guide, the touch handling code may need adjustments or a working example from the same hardware [#18368536]
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18364472
    MaciejWarloch
    Level 1  
    Posts: 1
    I have the problem that I have assembled a weather station based on wemos D1 and ILI9341 TFT 2.8 inch display.The display is touch screen. When I touch the display, the display page should change, but only the LED on the wemos D1 lights up. In the project it is described that a stronger board should be used and I don't know if my problem is caused by this weaker board. Here I give a link to the project: docs.thingpulse.com/guides/wifi-color-display-kit/
    Attachments:
    • VID_20191228_121836.mp4 (19.79 MB) You must be logged in to download this attachment.
    • esp8266-weather-station-color.zip (247.05 KB) You must be logged in to download this attachment.
    • VID_20191228_121836.mp4 (19.79 MB) You must be logged in to download this attachment.
    • esp8266-weather-station-color.zip (247.05 KB) You must be logged in to download this attachment.
  • ADVERTISEMENT
  • #2 18368536
    kaczakat
    Level 34  
    Posts: 1748
    Help: 317
    Rate: 229
    The easiest way is to buy the whole kit and then it should work. The LCD has two SPI interfaces, one for the screen and one for the touch. The touch should tell the ESP via the IRQ pin that something has been triggered and the ESP should switch to handle the touch and read what. If you have that IRQ connected to the same pin as the LED, that's what works. If you have a slightly different LCD then the whole software handling may work differently and you need to write it yourself, if only by copying from some working example. Maybe you could rummage through the author's other projects and find a test sketch just for the screen and see how it works, there are options for calibration for example.
    As for the more powerful board it is rather irrelevant, there it is listed as the second NodeMCU, and it is practically the same only worse (more pins, but still not usable for the average person without a torch, bigger size, higher power consumption during operation and sleep).
    Different ESP boards have differently labelled GPIO pins vs D0, D1, D2 etc. It is important to use exactly the same board in the setup that the author used. The chip is the same, the program is the same, but the program may have a different GPIO pin in mind when seeing D0 and maybe this is where the problem is. There is also the option that he compiled for NODEMCU and uploaded to WEMOS mini, such a mistake needs to be repeated (although I doubt it, these boards differ only in the LED pin, instead WEMOS vs WEMOS MINI already has a different GPIO pin layout).
    Helpful post? Buy me a coffee.
  • #3 18379827
    faber
    Level 24  
    Posts: 701
    Help: 49
    Rate: 36
    Since the LED lights up, the connection of the touch is ok. And the touch calibration is not required by this project ? Check this calibration.
  • ADVERTISEMENT
  • #4 18576423
    Gienek
    Level 37  
    Posts: 2775
    Help: 393
    Rate: 350
    The topic froze a bit.
    With the necessary parts available and curious about the operation of this station, I decided to get it up and running. It turns out that it's not that easy, as the information on the project website is very sparse, and I'm stuck in the middle of repeating the project.
    The program provided by the author compiles correctly with no comments, uploading the program to the Wemos D1 mini Pro also without comments. Strange things start when starting the station - the start screen appears and on it endlessly CONECTING TO WIFI "network name" and cannot in any way connect to the router, and without this the program continues not to be executed.
    I have described in quite some detail the situation that has arisen, because I no longer know whether it is the fault of the software itself or whether my router "is somehow resistant".
    My router is EDIMAX BR-6204WG. However, the part of the software responsible for establishing a WiFi connection looks like this:
    Code: C / C++
    Log in, to see the code
    .

    And now the question: is the reason for the lack of connection in this program? Or is the router to blame?

    I should add that WIFI_SSID, WIFI_PASS and WIFI_HOSTNAME are correctly assigned.
  • #6 18578358
    Gienek
    Level 37  
    Posts: 2775
    Help: 393
    Rate: 350
    Thanks for your interest in the subject and your quick response.
    My knowledge is still expanding, but no solution to the problem.
    From the indicated page I have uploaded the appropriate programmer and after a hard reset in the port monitor I get:
    
    trochę śmieci
    Connecting to "moja sieć"
    Connection status : 6
    
    .

    From the page I read that 6 - WL_DISCONNECTED

    I understand that there is a connection failure, but I don't know what the cause is.
    I still don't know "what is going on". Is it a failure of the module itself, or am I making mistakes during the upload (upload goes through without errors).

    When uploading the software from the project author's website, in the Arduino IDE I set : Board: "LOLIN(WEMOS) D1 R2 & mini". After uploading the software, my board (previously visible as ESP_25xxxx) "disappeared" in the list of available networks.
    Now also, when uploading WiFi.status(), I left the same settings.
    Is this a bug and is that why the problem persists?
    I would appreciate any suggestions.

    PS.
    The WiFi module itself is working, because after uploading the WiFiScan program it finds many available networks.
  • #7 18579136
    kaczakat
    Level 34  
    Posts: 1748
    Help: 317
    Rate: 229
    If you select "station" there is no AP in the network environment. Generally it's a good idea for there to be a station, otherwise there are ESPs lying around the house somewhere with open WIFI allowing you to connect to the internet. Upload any example of a server to the board, just give your router login details, check if it's a hardware or software fault. Set up a memory cleanup in the ESP.
    Touch does not work in the weather station on ESP8266 with ILI9341 .
    Helpful post? Buy me a coffee.
  • #8 18579253
    Anonymous
    Level 1  
  • #9 18579466
    Gienek
    Level 37  
    Posts: 2775
    Help: 393
    Rate: 350
    Thanks to colleagues for their replies.
    @khoam removing the WiFi.disconnect() command doesn't change anything (it was added by the author to disconnect connections if there were any).
    BR-6204WG configuration:
    Touch does not work in the weather station on ESP8266 with ILI9341 Touch does not work in the weather station on ESP8266 with ILI9341 Touch does not work in the weather station on ESP8266 with ILI9341 Touch does not work in the weather station on ESP8266 with ILI9341 .

    After placing the command Serial.setDebugOutput(true) on the console I get:
    
    ....scandone
    no EDIMAX found, reconect after ls
    .reconet
    
    .

    and it keeps repeating.

    Strange thing, because I have two phones and a laptop "hooked up" to this router. With the connection I had no problem, and with this module there is a problem.

    What is the issue here? :D .

    Mate @kaczakat - I uploaded the program for the AP and found my module in the network environment. Conclusion - hardware functional :D .
  • ADVERTISEMENT
  • #10 18579906
    Anonymous
    Level 1  
  • #11 18579968
    Gienek
    Level 37  
    Posts: 2775
    Help: 393
    Rate: 350
    Unfortunately, this router in "encryption" only has options: WPA, WPA pre-shared keey, WPA RADIUS.
  • #12 18579975
    Anonymous
    Level 1  
  • #13 18579986
    Gienek
    Level 37  
    Posts: 2775
    Help: 393
    Rate: 350
    At the moment, this is how I have it switched on.
  • #14 18579997
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • #15 18580005
    Gienek
    Level 37  
    Posts: 2775
    Help: 393
    Rate: 350
    Yes, sorry. I misstated the options. Should be: WEP, WPA pre-shared keey, WPA RADIUS.
    And I have WEP enabled.

    When I click on WPA pre-shared keey, the options appear: WPA(TKIP), WPA2(AES) and WPA2 Mixed.


    Just which version to use?
  • #16 18580036
    Anonymous
    Level 1  
  • #17 18580257
    Gienek
    Level 37  
    Posts: 2775
    Help: 393
    Rate: 350
    You are great :D I would never have come across that the password encryption system could have such an impact.
    Everything is laughing as it should.
    Thanks a lot for your help and patience.
  • #18 18580419
    Anonymous
    Level 1  
  • #19 18581223
    Gienek
    Level 37  
    Posts: 2775
    Help: 393
    Rate: 350
    I was right - you are GREAT. For you, finding such details is a piece of cake. I am just a "Sunday" ARDUINO enthusiast and I am not a powerhouse in ESP8266 either. It is good that there are people like you and willing to share their knowledge.
    The reason I set this WEP was because it was the default option and I left it, you more so because tests had to be done quickly. It was confusing to me how the phones and laptop behaved because they didn't respond to this encryption. The Wemos D1 mini pro, however, is better refined and responsive to security.
    I have now set up WPA2 Mixed and it works just fine.
    Once again - many thanks and "respect"

Topic summary

✨ The discussion revolves around issues with a weather station project utilizing a Wemos D1 board and an ILI9341 TFT touchscreen display. The main problem reported is that the touchscreen does not respond to user input, only activating an LED on the Wemos D1. Responses suggest checking the IRQ pin connection, ensuring proper calibration, and verifying the software setup. A user later encounters WiFi connection issues, leading to troubleshooting steps that include checking the router settings and switching from WEP to WPA-PSK encryption, which ultimately resolves the connectivity problem. The conversation highlights the importance of correct hardware configuration and software debugging in DIY electronics projects.
Generated by the language model.

FAQ

TL;DR: With ESP8266 + ILI9341, 2 SPI interfaces are involved; "The LCD has two SPI interfaces..." Validate touch IRQ isn’t on the LED pin and match board pin mapping; if Wi‑Fi loops, check router security and logs. [Elektroda, kaczakat, post #18368536]

Why it matters: This FAQ helps ESP8266 tinkerers fix touch and Wi‑Fi issues fast without swapping hardware.

Quick Facts

How do I fix an ILI9341 touch that lights the ESP8266 LED but doesn’t change pages?

Your touch IRQ is likely wired to the onboard LED pin. Move IRQ to a free GPIO supported by your sketch. ILI9341 shields use two SPI paths: one for TFT, one for touch. Ensure separate CS lines and correct IRQ. “The LCD has two SPI interfaces, one for the screen and one for the touch.” Confirm pin mapping matches the author’s board. Test with the vendor’s touch-calibration example before integrating. [Elektroda, kaczakat, post #18368536]

Do I need a more powerful board than Wemos D1 mini for this weather station?

No. A NodeMCU is not meaningfully more powerful for this project. It mainly differs in size, pin count, and LED pin mapping. Power consumption can be higher on some NodeMCU variants. Use the same board and pin map the author used to avoid mismatches. [Elektroda, kaczakat, post #18368536]

Which pins should I check for the ILI9341 touch controller on ESP8266?

Verify touch CS and IRQ are on free GPIOs, not the LED pin. Keep TFT CS separate from touch CS. Match D0/D1… labels to actual GPIO numbers for your specific dev board. Use the exact board profile the project targets. [Elektroda, kaczakat, post #18368536]

Do I need to calibrate the touch for this project?

Yes, run the touch calibration or a dedicated test sketch first. Calibration ensures accurate coordinates and proves the controller is read correctly. If calibration fails, recheck wiring and CS/IRQ pins. [Elektroda, faber, post #18379827]

Why won’t my ESP8266 connect to Wi‑Fi when the router uses WEP?

WEP is not supported in the Arduino ESP8266 STA path. Switch the router to WPA‑PSK (WPA2/AES or Mixed). “WEP mode is blocked.” This edge case looks like endless connection attempts with no association. Change encryption and reconnect. [Elektroda, khoam, post #18580419]

What does WiFi.status() return when it keeps failing to connect?

Print WiFi.status() inside the loop. A status of 6 means WL_DISCONNECTED. That confirms failure to associate or authenticate. Use it to verify the issue before changing router settings or code. [Elektroda, Gienek, post #18578358]

How do I enable detailed Wi‑Fi debug logs on ESP8266?

Add Serial.setDebugOutput(true) right after Serial.begin(). Then open the Serial Monitor to view messages like “scandone” and reconnect attempts. These logs help pinpoint SSID, auth, or signal problems quickly. [Elektroda, khoam, post #18579253]

Which router security settings work reliably with ESP8266?

Use WPA pre‑shared key. For best results, set WPA2(AES) or WPA2 Mixed. After switching from WEP to WPA2 Mixed, the connection succeeds and the app continues. [Elektroda, Gienek, post #18581223]

Why did the ESP_XXXX access point disappear after flashing my sketch?

Your sketch set Wi‑Fi to station mode, so the ESP8266 stops broadcasting its AP. That is normal and preferred for client devices. Use a server example with your router credentials to verify station operation. [Elektroda, kaczakat, post #18579136]

How long does the sample Wi‑Fi connection loop run before showing full progress?

The code delays 500 ms per iteration and increments a progress bar. It cycles after 80 steps, about 40 seconds. There is no timeout, so it can loop indefinitely while disconnected. Add a timeout if needed. [Elektroda, Gienek, post #18576423]

How can I confirm my ESP8266 hardware is fine despite connection failures?

Flash an AP example and check if your phone sees the ESP’s network. If the AP appears, the radio works. Then focus on router encryption and sketch settings for STA mode fixes. [Elektroda, Gienek, post #18579466]

I used a different ILI9341 module; will the provided code still work?

Not always. Touch controllers, pinouts, and drivers can differ. You may need to adapt pin assignments or library calls. Start with a known-good test sketch and add calibration before integrating. [Elektroda, kaczakat, post #18368536]

What Arduino IDE board setting should I choose for Wemos D1 mini?

Select “LOLIN(WEMOS) D1 R2 & mini” when targeting Wemos D1 mini or mini Pro. Avoid NodeMCU profiles unless your hardware matches, because D0/D1… labels map differently. Mismatches break LED and IRQ behavior. [Elektroda, kaczakat, post #18368536]

How do I switch from WEP to WPA‑PSK on an Edimax BR‑6204WG to fix ESP8266 Wi‑Fi?

  1. In the router UI, change encryption to “WPA pre‑shared key.”
  2. Select WPA2(AES) or “WPA2 Mixed,” then save and reboot.
  3. Reboot the ESP8266 and reconnect; it should proceed past Wi‑Fi and run. [Elektroda, Gienek, post #18581223]

Should I buy the full weather-station kit or wire it myself?

Buying the complete kit is the easiest path because it guarantees matching parts and wiring. DIY is fine, but be ready to adapt pins, drivers, and calibration. Start from the author’s examples to validate each subsystem. [Elektroda, kaczakat, post #18368536]
Generated by the language model.
ADVERTISEMENT