Hi, I'm trying out the capacitive touch buttons on my MKR IoT carrier, and the TOUCH0 or the first touch button is not working. I tried the other touch buttons, and they work fine. I looked through the Arduino articles https://support.arduino.cc/hc/en-us/articles/360021222000 to diagnose any hardware issues, and it seems there are none (as the serial plotter shows activity when the TOUCH0 is being pressed). I looked through https://support.arduino.cc/hc/en-us/articles/360021221980-Calibrating-the-MKR-IoT-Carrier-capacitive-buttons to try to calibrate the buttons next and the first touch button still doesn't work.
I am using the carrier with plastic encasing.
#include <Arduino_MKRIoTCarrier.h>
MKRIoTCarrier carrier;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
carrier.withCase();
carrier.begin();
carrier.Button0.updateConfig(0);
}
void loop() {
// put your main code here, to run repeatedly:
carrier.Buttons.update();
// Checks if button 00 is touched
if (carrier.Buttons.getTouch(TOUCH0))
{
Serial.println("Button 1 pressed down");
carrier.leds.setPixelColor(0, 255, 0, 0);
carrier.leds.setBrightness(255);
carrier.leds.show();
} else {
carrier.leds.setBrightness(0);
carrier.leds.show();
}
}
The code above is what I've tried to run, running it with from TOUCH1 through TOUCH4 works perfectly fine, but TOUCH0 is causing an issue. It can't be a hardware issue since the button responded to the analogRead (in the first article), it just doesn't respond to the built in functions.
Kindly appreciate any help, thanks.