Добавляем использование всех пинов на ESP32 в качестве кнопки путем явного указания режима порта.

This commit is contained in:
2021-12-03 09:52:45 +03:00
parent b6c5f50123
commit 7e5b611c23

View File

@@ -20,7 +20,7 @@ class ButtonInClass : public LineParsing {
void init() {
if (_pin != "") {
int number = numberEntering++;
buttons[number].attach(_pin.toInt());
buttons[number].attach(_pin.toInt(), INPUT);
buttons[number].interval(_db.toInt());
but[number] = true;
jsonWriteStr(configOptionJson, "switch_num_" + String(number), _key);