-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inkplate_Wake_Up_On_Touchpads Doesn't Work on 6COLOR #179
Comments
Hi, |
@ifadiga Thanks for the link -- saw that issue but somehow totally missed the touchpad-related parts. I specifically want to figure out how to wake the MCU from sleep when a touchpad is pressed, as the sample suggests I can do. My goal is to be able to use the Inkplate as a sign that runs on battery, and change its state when I press a touchpad. I'm new to this so apologies for the potentially very basic questions. |
Hi, |
@GiantSox Can you please send the picture(s) of the Inkplate that you have, just to be sure, so we can give you a few solutions to this problem? |
Sorry for my delay--this is just a hobby project and life has gotten very busy for me these past few weeks. If I understand correctly, the touchpads are connected to the IO multiplexer, which is connected over i2c, and I'm a bit clueless as to how to make it wake up the ESP from sleep. I haven't had time to dedicate to this project in a few weeks but I was thinking that writing a ULP program to poll the touchpad state might work. If there's a simpler solution that'd be great, but learning how to program the ULP processor sounds like a fun learning experience for me when I eventually have more time :) |
@GiantSox Can you share links to the "Inkplate_Wake_Up_On_Touchpads" and "Inkplate_Touchpads" you've tried? I'm trying to get the same thing working but I don't see any examples for the 6COLOR, only other boards. When I try one of the other examples, I can't build the sketch because readTouchpads doesn't seem to be defined for the 6COLOR. I'm trying to wake from deep sleep when pressing a touchpad. I have the wakeup button working with Trying to use My board looks the same as in the picture. I'm using 6.0.0 of the library and 3.0.1 of the board definition. |
@GiantSox There is no need to poll the I/O expander with ULP on the I2C bus, as the expander has a pin change interrupt functionality. That means an INT pulse will fire from the I/O expander whenever a certain pin changes its state. And INT pin from the I/O expander is connected to the GPIO34 of the ESP32. So by just enabling interrupt on one of the I/O expander pins and enabling ESP32 to be woken up on GPIO34, you can wake up ESP32 with touchpads. @matthewmmorrow For some reason, this example is missing from the library. It must have been accidentally removed when the library was updated (and also the library broke for the same reason and you see this error). We will fix that and push an update on the library as soon as possible. Thanks for pointing that out! |
First of all, congratulations in this nice product and the effort you guys put into this. @BornaBiro The issue is open over a month. When can we expect the touchpads to be working? |
Hi @KarloLeksic, thank you. How do I find out which button has been pressed? |
Hi @bernji, The PCAL expander remembers which pin triggered the interrupt, and if you read its register at the beginning of the code, you should be able to read from which pin. But if you call display.begin(), that register will be deleted. You can initialize i2c communication with Wire.begin(), then call display.getINT(). That function returns uint16_t and each bit represents one pin from which the interrupt occurred. One bit should be set to 1, and the position of that bit represents the pin from which the interrupt occurred. |
Hi @KarloLeksic. I cannot confirm that the code for wakeup on touchpads works that you pointed to (Here) When i run the code I see errors as follows and the board restarts and shows "Wakeup caused by touchpads" although I have never touched any touchpad. rst:0x5 (DEEPSLEEP_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) Are you sure that code works on the "old" 6COLOR boards? |
Hi @bernji, It works perfectly for me. Can you please send me a photo of the Inkplate from the back side to check something? These messages aren't errors, it is a messages from ESP when it wakes up, restarts, etc. There were problems with the touchpads because they remained charged, and since they are calibrated at the beginning, then it turns out that they are constantly pressed. |
there are 3x3 points (I assume 3 for each touch pad) where should I exactly measure? |
@bernji There are three groups of jumpers and each group has three SMD jumper pads. Each group represents one touchpad.
Fixing the first problem is relatively easy. While powering on, there should be nothing on the touchpads otherwise it just constantly report that touch is detected. The second issue that can occur is that touchpad or capacitor can be charged and that can mess up the touchpad IC reading thinking there is touch detected. This can be fixed by discharging the white capacitor to the left of the touchpad IC. You can even discharge it with your fingers, put one finger on ESP32 metal shield and the other finger on the touchpad, and leave it like that for a few seconds. Do this for all touchpads and on power on it should work fine. I have to mention that you should do this discharge procedure while Inkplate is powered off. |
I got back to this project today. I uploaded the example sketch and I'm having the same issue as @bernji. The screen constantly wakes up and says "caused by touchpads". I measured the voltage from GND to the middle SMD pad on each touchpad and I'm getting 0V until I touch a pad and then I get 3.7V. I tried discharging the touchpads and no difference. What else should I try? |
There is no solder there (or on the uSD jumpers either). I tried to check the resistance and I think they are connected but it's hard to tell if I got the probes on the tiny pads. Here's the question: should they be connected? |
Yay! I added the resistor like in the photo and it's no longer constantly waking up. If I wait, I get the timer wakeup and if I press a touchpad then I get the touchpad wakeup. Are there any other hardware corrections for this board? |
Ok, so I think I've tested it and there are a few gotchas:
|
I'm glad that this simple fix helped. :)
|
Do you have an example of using multiple wake sources on |
Asking again if there are any examples for |
Hi there!
The Inkplate_Wake_Up_On_Touchpads sample doesn't seem to work on my 6COLOR. I've been tapping all 3 touchpads and nothing happens.
What does work:
Any help would be appreciated!
The text was updated successfully, but these errors were encountered: