logo elektroda
logo elektroda
X
logo elektroda

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

MaciejWarloch 1401 18
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18364472
    MaciejWarloch
    Level 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/
  • ADVERTISEMENT
  • #2 18368536
    kaczakat
    Level 34  
    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.
  • ADVERTISEMENT
  • #3 18379827
    faber
    Level 24  
    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.
  • #4 18576423
    Gienek
    Level 37  
    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.
  • ADVERTISEMENT
  • #6 18578358
    Gienek
    Level 37  
    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  
    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
    khoam
    Level 42  
    @Gienek .
    It seems to me that the WiFi.disconnect() command is redundant. It is called where it is already known that there is no network connection.
    Please show how the BR-6204WG is configured from the WiFi side. In addition, place the command Serial.setDebugOutput(true) following Serial.begin() in the program - detailed diagnostic information generated by the WiFi stack on the ESP8266 should appear on the console.
  • #9 18579466
    Gienek
    Level 37  
    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
    khoam
    Level 42  
    Gienek wrote:
    Configuration of BR-6204WG:
    .
    Can you switch the "encryption" from WEP to WPA-PSK for testing?
  • #11 18579968
    Gienek
    Level 37  
    Unfortunately, this router in "encryption" only has options: WPA, WPA pre-shared keey, WPA RADIUS.
  • #12 18579975
    khoam
    Level 42  
    Gienek wrote:
    Unfortunately, this router in "encryption" only has options: WPA, WPA pre-shared keey, WPA RADIUS.
    .
    You can use WPA for testing.
  • #13 18579986
    Gienek
    Level 37  
    At the moment, this is how I have it switched on.
  • #14 18579997
    khoam
    Level 42  
    Gienek wrote:
    At the moment this is how I have it enabled.

    From the picture you posted in post #9 it appears that WEP is enabled :crazyeyes: .
  • #15 18580005
    Gienek
    Level 37  
    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
    khoam
    Level 42  
    Gienek wrote:
    It should be: WEP, WPA pre-shared keey, WPA RADIUS.
    .
    Ok, "WPA pre-shared key" is WPA-PSK :) You can use for testing.
  • #17 18580257
    Gienek
    Level 37  
    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
    khoam
    Level 42  
    Gienek wrote:
    I would never have come across that the password encoding system could have such an effect.
    .
    This is a bit of an oddity with this WEP in STA mode. In the current Arduino HAL code for the ESP8266, in the file ESP8266WiFiSTA.cpp is in the begin() function:
    Code: C / C++
    Log in, to see the code
    On the surface it looks like there is a WEP selectable, but the variable _useInsecureWEP is defined by default, as:
    Code: C / C++
    Log in, to see the code
    and this value cannot be changed by any available function for STA mode, so WEP mode is blocked .
    All in all, perhaps a good thing. WEP hasn't been a secure encryption for a long time, so it's better not to use it.
  • #19 18581223
    Gienek
    Level 37  
    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.
Summary generated by the language model.
ADVERTISEMENT