mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
gate
This commit is contained in:
@@ -2,6 +2,41 @@
|
|||||||
#include "classes/IoTItem.h"
|
#include "classes/IoTItem.h"
|
||||||
#include "Arduino.h"
|
#include "Arduino.h"
|
||||||
|
|
||||||
|
// Enable debug prints to serial monitor
|
||||||
|
#define MY_DEBUG
|
||||||
|
|
||||||
|
//#define MY_RF24_CE_PIN 26 // Двигать пин CE на D4 чтобы освободить I2C
|
||||||
|
//#define MY_RF24_CS_PIN 9
|
||||||
|
|
||||||
|
// Use a bit lower baudrate for serial prints on ESP8266 than default in MyConfig.h
|
||||||
|
|
||||||
|
#define MY_BAUD_RATE 115200
|
||||||
|
|
||||||
|
// Enables and select radio type (if attached)
|
||||||
|
#define MY_RADIO_RF24
|
||||||
|
//#define MY_RADIO_RFM69
|
||||||
|
//#define MY_RADIO_RFM95
|
||||||
|
|
||||||
|
//#define MY_RF24_DATARATE RF24_1MBPS // Для платы KeyWish скорость 1 мегабит
|
||||||
|
|
||||||
|
// How many clients should be able to connect to this gateway (default 1)
|
||||||
|
#define MY_GATEWAY_MAX_CLIENTS 10
|
||||||
|
|
||||||
|
// Set LOW transmit power level as default, if you have an amplified NRF-module and
|
||||||
|
// power your radio separately with a good regulator you can turn up PA level.
|
||||||
|
#define MY_RF24_PA_LEVEL RF24_PA_LOW
|
||||||
|
|
||||||
|
// Enable serial gateway
|
||||||
|
#define MY_GATEWAY_SERIAL
|
||||||
|
|
||||||
|
#define CHILD_ID 1
|
||||||
|
|
||||||
|
#include <MySensors.h>
|
||||||
|
|
||||||
|
void receive(const MyMessage& message) {
|
||||||
|
Serial.println("receive");
|
||||||
|
}
|
||||||
|
|
||||||
class MySensorsGate : public IoTItem {
|
class MySensorsGate : public IoTItem {
|
||||||
private:
|
private:
|
||||||
int _pin;
|
int _pin;
|
||||||
|
|||||||
Reference in New Issue
Block a user