This commit is contained in:
2021-06-11 15:04:54 +03:00
parent 2d0ce57744
commit 20ae80b7d3
3 changed files with 149 additions and 44 deletions

View File

@@ -4,10 +4,12 @@
#include <Wire.h>
#include "MHZ19.h"
#define DEBUG
#define MY_DEBUG
#define MY_RADIO_RF24
#define MY_RF24_CHANNEL (105)
#define MY_RF24_PA_LEVEL RF24_PA_MAX
#define MY_TRANSPORT_WAIT_READY_MS 5000
//#define MY_REPEATER_FEATURE
#define MY_DEFAULT_ERR_LED_PIN (A3) // Error led pin
@@ -17,24 +19,32 @@
#include <MySensors.h>
#include <SoftwareSerial.h> // Remove if using HardwareSerial or non-uno compatabile device
#include <HTU21D.h>
#include <RunningMedian.h>
void printDeb(String msg);
#define RX_PIN 8
#define TX_PIN 7
#define BAUDRATE 9600
#define MOTION (4)
#define MOTION (3)
#define PS (4)
#define LED_WHITE (5)
#define LED_BLUE (6)
MHZ19 myMHZ19;
SoftwareSerial mySerial(RX_PIN, TX_PIN);
HTU21D myHTU21D(HTU21D_RES_RH10_TEMP13);
RunningMedian samples = RunningMedian(5 * sizeof(int));
uint8_t periodMinCO2;
uint8_t periodMotion;
uint8_t curDelay;
uint8_t spLight, dbLight;
uint16_t levelBlue, levelWhite;
//uint8_t periodMinCO2;
byte periodMotion;
int8_t curDelay;
uint16_t spLight, dbLight;
uint8_t timeLight;
byte levelBlue, levelWhite;
bool move, lightWhite;
float temp, hum;
bool bLamp, wLamp;
uint8_t statLamp;
#endif