mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
Добавляем analogRead
This commit is contained in:
@@ -39,6 +39,12 @@ class SysExt : public IoTItem {
|
|||||||
value.valD = IoTgpio.digitalRead(param[0].valD);
|
value.valD = IoTgpio.digitalRead(param[0].valD);
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
} else if (command == "analogRead") {
|
||||||
|
if (param.size()) {
|
||||||
|
IoTgpio.pinMode(param[0].valD, INPUT);
|
||||||
|
value.valD = IoTgpio.analogRead(param[0].valD);
|
||||||
|
return value;
|
||||||
|
}
|
||||||
} else if (command == "digitalWrite") {
|
} else if (command == "digitalWrite") {
|
||||||
if (param.size() == 2) {
|
if (param.size() == 2) {
|
||||||
IoTgpio.pinMode(param[0].valD, OUTPUT);
|
IoTgpio.pinMode(param[0].valD, OUTPUT);
|
||||||
|
|||||||
Reference in New Issue
Block a user