mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-31 04:19:15 +03:00
Добавляем использование всех пинов на ESP32 в качестве кнопки путем явного указания режима порта.
This commit is contained in:
@@ -20,7 +20,7 @@ class ButtonInClass : public LineParsing {
|
|||||||
void init() {
|
void init() {
|
||||||
if (_pin != "") {
|
if (_pin != "") {
|
||||||
int number = numberEntering++;
|
int number = numberEntering++;
|
||||||
buttons[number].attach(_pin.toInt());
|
buttons[number].attach(_pin.toInt(), INPUT);
|
||||||
buttons[number].interval(_db.toInt());
|
buttons[number].interval(_db.toInt());
|
||||||
but[number] = true;
|
but[number] = true;
|
||||||
jsonWriteStr(configOptionJson, "switch_num_" + String(number), _key);
|
jsonWriteStr(configOptionJson, "switch_num_" + String(number), _key);
|
||||||
|
|||||||
Reference in New Issue
Block a user