mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
some changes
This commit is contained in:
BIN
doc/orders.xlsm
BIN
doc/orders.xlsm
Binary file not shown.
26
include/Class/Sensor.h
Normal file
26
include/Class/Sensor.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
#include "Class/LineParsing.h"
|
||||
#include "Global.h"
|
||||
|
||||
class Sensor : public LineParsing {
|
||||
public:
|
||||
Sensor() : LineParsing(){};
|
||||
|
||||
void SensorInit() {
|
||||
if (_pin != "") {
|
||||
pinMode(_pin.toInt(), INPUT);
|
||||
}
|
||||
}
|
||||
|
||||
void SensorRead(String key, String pin, String state) {
|
||||
int pinInt = pin.toInt();
|
||||
analogWrite(pinInt, state.toInt());
|
||||
eventGen(key, "");
|
||||
jsonWriteInt(configLiveJson, key, state.toInt());
|
||||
MqttClient::publishStatus(key, state);
|
||||
}
|
||||
};
|
||||
|
||||
//extern Sensor* mySensor;
|
||||
@@ -28,7 +28,6 @@ lib_deps_internal =
|
||||
[env:esp32]
|
||||
framework = arduino
|
||||
board = esp32dev
|
||||
board_build.filesystem = littlefs
|
||||
platform = https://github.com/platformio/platform-espressif32.git
|
||||
lib_deps =
|
||||
${common_env_data.lib_deps_external}
|
||||
@@ -37,7 +36,9 @@ lib_deps =
|
||||
ESP32Servo
|
||||
LITTLEFS
|
||||
monitor_filters = esp32_exception_decoder
|
||||
upload_speed = 921600
|
||||
monitor_speed = 115200
|
||||
board_build.filesystem = littlefs
|
||||
|
||||
[env:esp8266_01_1m]
|
||||
framework = arduino
|
||||
@@ -51,8 +52,10 @@ lib_deps =
|
||||
ESPAsyncUDP
|
||||
EspSoftwareSerial
|
||||
monitor_filters = esp8266_exception_decoder
|
||||
upload_speed = 921600
|
||||
monitor_speed = 115200
|
||||
board_build.filesystem = littlefs
|
||||
board_build.f_cpu = 160000000L
|
||||
|
||||
[env:esp8266]
|
||||
framework = arduino
|
||||
@@ -65,6 +68,7 @@ lib_deps =
|
||||
ESPAsyncUDP
|
||||
EspSoftwareSerial
|
||||
monitor_filters = esp8266_exception_decoder
|
||||
upload_speed = 921600
|
||||
monitor_speed = 115200
|
||||
board_build.filesystem = littlefs
|
||||
board_build.f_cpu = 160000000L
|
||||
|
||||
Reference in New Issue
Block a user