I have an Adafruit circuit playground classic, and the touch-pads are so very sensitive. From a centimeter away, they trigger. I would be happy to just have regular inputs, or to have the sensitivity reduced. How can I do this?
To clarify, here is my code:
//keyboard control for TuxKart power Glove
#include <Adafruit_CircuitPlayground.h>
#include <Keyboard.h>
#include <Mouse.h>
// set pin numbers for the five buttons:
const int Fire = 6;
const int Nitro = 9;
const int Eagle = 10;
const int _Esc = 12;
bool slideSwitch;
void setup() { // initialize the buttons' inputs:
pinMode(Fire, INPUT_PULLUP);
pinMode(Nitro, INPUT_PULLUP);
pinMode(Eagle, INPUT_PULLUP);
pinMode(_Esc, INPUT_PULLUP);
Serial.begin(9600);
// initialize mouse control:
//Mouse.begin();
Keyboard.begin();
}
void loop() {
if (!CircuitPlayground.slideSwitch()) {
return;
}
// use the pushbuttons to control the keyboard:
if (!digitalRead(Fire) == HIGH) {
Keyboard.write('KEY_SPACE');
Serial.println("F");
}
if (!digitalRead(Nitro) == HIGH) {
Keyboard.write('n');
Serial.println("U");
}
if (!digitalRead(Eagle) == HIGH) {
Keyboard.write(0xB2);
Serial.println("N");
}
if (!digitalRead(_Esc) == HIGH) {
Keyboard.write(0xB1);
Serial.println("K");
}
delay(200);
}
This code or any other, where capacitive touch sensitivity has not been specified, yields pins having extreme sensitivity. I have read the comments, that say the MCU doesn't feature this natively. If that were true, how would the pins remain sensitive?
My solution to this is to set sensitivity so low, that it is negligible. If capacitive touch sensing is not specified, why am I getting that functionality? Why would this code give me capacitive touch sensing? Ideally, I would disable the touch sensing somehow, or have the pins simply behave normally, like any other Arduino based device that doesn't have touch sense. But what I have guessed, (shown in code) doesn't work. If there is a more explicit way to specify that IO pins should act as normal pins, without capacitive touch sensing, I would surely like to know.