Capacitive buttons only work when holding Core2 or when sitting on metal surface
-
Hmm, I see none of the effects described here. My touch screen seems to work fine, with cable plugged and unplugged.
-
Hi guys
interesting. I wonder if we're dealing with different touch firmware versions? Here is the readout of my Core2 touch (read only registers):
LIB_VER_H (0xA1) : 0x30
LIB_VER_L (0xA2) : 0x0E
CIPHER (0xA3) : 0x64
FIRMID (0xA6) : 0x10
FOCALTECH_ID (0xA8) : 0x11
RELEASE_CODE_ID (0xAF) : 0x01Thanks
Felix -
@rop said in Capacitive buttons only work when holding Core2 or when sitting on metal surface:
Hmm, I see none of the effects described here. My touch screen seems to work fine, with cable plugged and unplugged.
You're lucky! The backlit area of touch screen is fine. It's the capacitive buttons (part of the touch screen glass, but below the actual IPS LCD screen) that have the issue for me. Please confirm if the capacitive buttons work for you in the scenarios described above (non-conductive surfaces).
-
I'm using uiFlow firmware Beta2-core2 as listed in the M5-Burner app.
How can I read the registers to obtain the values? -
Hi @world101
please try below python code (sorry no Blockly as I couldn't figure out how to convert values to hex in Blockly).
You'll need to have your Core2 connected to your computer and open the COM Monitor in M5Burner to see the output.from m5stack import * from m5stack_ui import * from uiflow import * import i2c_bus screen = M5Screen() screen.clean_screen() screen.set_screen_bg_color(0xFFFFFF) i2c0 = i2c_bus.easyI2C(i2c_bus.PORTA, 0x38, freq=400000) print("LIB_VER_H (0xA1) : ", hex(i2c0.read_u8(0xA1))) print("LIB_VER_L (0xA2) : ", hex(i2c0.read_u8(0xA2))) print("CIPHER (0xA3) : ", hex(i2c0.read_u8(0xA3))) print("FIRMID (0xA6) : ", hex(i2c0.read_u8(0xA6))) print("FOCALTECH_ID (0xA8) : ", hex(i2c0.read_u8(0xA8))) print("RELEASE_CODE_ID (0xAF) : ", hex(i2c0.read_u8(0xAF)))
Cheers
Felix -
Please confirm if the capacitive buttons work for you in the scenarios described
above (non-conductive surfaces).OK, I see what you mean now. I hadn't tested the buttons below the screen without the USB cable. Seems like a grounding issue of sorts: the display area probably has a metal base plate.
Bummer, makes the buttons less usable.
I used my own library fork to test, and the following code, which simply puts a white rectangle 40 pixels above a pressed off-screen button.
#include <M5Core2.h> void setup() { M5.begin(); M5.BtnA.fnPress = M5.BtnA.fnRelease = btnHandler; M5.BtnB.fnPress = M5.BtnB.fnRelease = btnHandler; M5.BtnC.fnPress = M5.BtnC.fnRelease = btnHandler; } void loop() { M5.update(); } void btnHandler(TouchButton &btn) { M5.Lcd.fillRect(btn.x0, btn.y0 - 40, btn.x1 - btn.x0, btn.y1 - btn.y0, btn.isPressed() ? WHITE : BLACK); }
-
Hi guys
today I've opened my M5Core2 and tried to improve the responsiveness of the three capacitive buttons below the screen by adding some grounded copper below. It helped but unfortunately it's still not perfect.
https://www.gwendesign.ch/kb/m5stack/m5core2/#capacitive-touch-button-improvement
Happy Stacking!
Felix -
This post is deleted! -
Found an undocumented register on the FT6336 touch chip: reg 0x82 is touch sensitivity. Default set to 15 (0x0F). Setting it to 1 makes it see your finger before it touches, setting it to 127 makes it really hard to get it to detect unless you really push. To play with it with my library:
M5.Touch.ft6336(0x82, 13);
to set it to 13. AlsoM5.Touch.dump()
shows all the registers.Was hoping a lower setting would make it see the area under the circles better. But no luck, even at one that pretty much the same behaviour. The default seems well-chosen: I see no benefits to changing it either way.
-
Hi @Rop
I think I've played with that register setting myself at one point in the past and I also did not see any difference in regard of the area under the circles. It will be interesting to see if that will be improved in one of the next M5Core2 hardware revisions.
Thanks
Felix