mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
@@ -19,7 +19,7 @@
|
||||
0;bmp280;tmpid;anydataTemp;Сенсоры;Температура;1;c[1]
|
||||
0;bmp280;prsid;anydataPress;Сенсоры;Давление;3;c[1];addr[0x76];int[10]*
|
||||
0;ccs811;ppmid;anydataPpm;Сенсоры;Содержание#CO2;1;c[1]
|
||||
0;ccs811;ppbid;anydataPpb;Сенсоры;Содержание#орг#соед;2;c[1];int[10]*
|
||||
0;ccs811;ppbid;anydataPpb;Сенсоры;Содержание#орг#соед;2;c[1];addr[0x76];int[10]*
|
||||
0;impuls-out;impid;na;na;na;order;gpio*
|
||||
0;count-down;cntid;anydata;Таймер;Обратный#отчет;order*
|
||||
0;inoutput;txtid;anydata;Вывод;Вывод#uart;order*
|
||||
|
||||
Binary file not shown.
@@ -43,7 +43,7 @@
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
"title": "Версия файловой системы: 275"
|
||||
"title": "Версия файловой системы: 276"
|
||||
},
|
||||
{
|
||||
"type": "h4",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#define FIRMWARE_VERSION 275
|
||||
#define FIRMWARE_VERSION 276
|
||||
|
||||
#ifdef esp8266_4mb
|
||||
#define FIRMWARE_NAME "esp8266_4mb"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
;To choose board please use one of definition:
|
||||
;esp8266_1mb , esp8266_4mb , esp32_4mb
|
||||
[platformio]
|
||||
default_envs = esp8266_4mb
|
||||
default_envs = esp8266_1mb
|
||||
|
||||
|
||||
[common_env_data]
|
||||
|
||||
@@ -52,7 +52,7 @@ void addItem2(int num) {
|
||||
if (seachingLine.indexOf("gpio") != -1) {
|
||||
seachingLine.replace("gpio", "pin[" + String(getFreePinAll()) + "]");
|
||||
}
|
||||
|
||||
|
||||
addFile(DEVICE_CONFIG_FILE, seachingLine);
|
||||
Serial.println(seachingLine);
|
||||
}
|
||||
@@ -132,7 +132,7 @@ uint8_t getFreePinAll() {
|
||||
uint8_t pins[] = {0, 12, 13, 14, 15, 16, 1, 2, 3, 4, 5};
|
||||
#endif
|
||||
#ifdef ESP32
|
||||
uint8_t pins[] = {0, 12, 13, 14, 15, 16, 1, 2, 3, 4, 5};
|
||||
uint8_t pins[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 25, 26, 27, 32, 33, 34, 35, 36, 39};
|
||||
#endif
|
||||
uint8_t array_sz = sizeof(pins) / sizeof(pins[0]);
|
||||
uint8_t i = getNewElementNumber("pins.txt");
|
||||
@@ -145,7 +145,12 @@ uint8_t getFreePinAll() {
|
||||
|
||||
bool isPinExist(unsigned int num) {
|
||||
bool ret = false;
|
||||
#ifdef ESP8266
|
||||
unsigned int pins[] = {0, 1, 2, 3, 4, 5, 9, 10, 12, 13, 14, 15, 16};
|
||||
#endif
|
||||
#ifdef ESP32
|
||||
unsigned int pins[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 25, 26, 27, 32, 33, 34, 35, 36, 39};
|
||||
#endif
|
||||
uint8_t array_sz = sizeof(pins) / sizeof(pins[0]);
|
||||
for (uint8_t i = 0; i < array_sz; i++) {
|
||||
if (pins[i] == num) ret = true;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
SensorAnalog::SensorAnalog(String key, unsigned long interval, unsigned int adcPin, int map1, int map2, int map3, int map4, float c) {
|
||||
_interval = interval * 1000;
|
||||
_key = key;
|
||||
_adcPin = _adcPin;
|
||||
_adcPin = adcPin;
|
||||
|
||||
_map1 = map1;
|
||||
_map2 = map2;
|
||||
|
||||
@@ -12,7 +12,7 @@ SensorCcs811::SensorCcs811(const paramsCcs811& paramsPpm, const paramsCcs811& pa
|
||||
|
||||
ccs811 = new Adafruit_CCS811();
|
||||
|
||||
if (!ccs811->begin()) SerialPrint("E", "Sensor CCS", "Wire not connected");
|
||||
if (!ccs811->begin(hexStringToUint8(_paramsPpb.addr))) SerialPrint("E", "Sensor CCS", "Wire not connected");
|
||||
}
|
||||
|
||||
SensorCcs811::~SensorCcs811() {}
|
||||
|
||||
11
src/main.cpp
11
src/main.cpp
@@ -19,17 +19,17 @@
|
||||
#include "Utils/Timings.h"
|
||||
#include "Utils/WebUtils.h"
|
||||
#include "items/ButtonInClass.h"
|
||||
#include "items/vSensorUptime.h"
|
||||
#include "items/vCountDown.h"
|
||||
#include "items/vImpulsOut.h"
|
||||
#include "items/vLogging.h"
|
||||
#include "items/vSensorAnalog.h"
|
||||
#include "items/vSensorBme280.h"
|
||||
#include "items/vSensorBmp280.h"
|
||||
#include "items/vSensorCcs811.h"
|
||||
#include "items/vSensorDallas.h"
|
||||
#include "items/vSensorDht.h"
|
||||
#include "items/vSensorUltrasonic.h"
|
||||
#include "items/vSensorCcs811.h"
|
||||
#include "items/vSensorUptime.h"
|
||||
|
||||
void not_async_actions();
|
||||
|
||||
@@ -160,9 +160,14 @@ void loop() {
|
||||
mySensorBmp280->at(i).loop();
|
||||
}
|
||||
}
|
||||
if (mySensorCcs811 != nullptr) {
|
||||
if (mySensorCcs811 != nullptr) {
|
||||
for (unsigned int i = 0; i < mySensorCcs811->size(); i++) {
|
||||
mySensorCcs811->at(i).loop();
|
||||
}
|
||||
}
|
||||
if (mySensorUptime != nullptr) {
|
||||
for (unsigned int i = 0; i < mySensorUptime->size(); i++) {
|
||||
mySensorUptime->at(i).loop();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user