Renamed MySensor.h -> MySensors.h (#481)
* Renamed MySensor.h -> MySensors.h Replaced all references to MySensor.h in examples with MySensors.h * MySensorCore.* renamed to MySensorsCore.* This should make it comply more with naming standards * Updated reference to MySensors core lib
This commit is contained in:
@@ -18,14 +18,14 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file MySensor.h
|
||||
* @file MySensors.h
|
||||
*
|
||||
* MySensors main interface (includes all necessary code for the library)
|
||||
*/
|
||||
#ifndef MySensor_h
|
||||
#define MySensor_h
|
||||
#ifndef MySensors_h
|
||||
#define MySensors_h
|
||||
|
||||
#include "core/MySensorCore.h"
|
||||
#include "core/MySensorsCore.h"
|
||||
|
||||
// Detect node type
|
||||
/**
|
||||
@@ -290,7 +290,7 @@
|
||||
|
||||
#include "core/MyCapabilities.h"
|
||||
#include "core/MyMessage.cpp"
|
||||
#include "core/MySensorCore.cpp"
|
||||
#include "core/MySensorsCore.cpp"
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#ifndef MyInclusionMode_h
|
||||
#define MyInclusionMode_h
|
||||
|
||||
#include "MySensorCore.h"
|
||||
#include "MySensorsCore.h"
|
||||
|
||||
|
||||
extern bool gatewayTransportSend(MyMessage &message);
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#ifndef MyOTAFirmwareUpdate_h
|
||||
#define MyOTAFirmwareUpdate_h
|
||||
|
||||
#include "MySensorCore.h"
|
||||
#include "MySensorsCore.h"
|
||||
|
||||
// Size of each firmware block
|
||||
#define FIRMWARE_BLOCK_SIZE 16
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* it in the sketch:
|
||||
* #include "MyPrivateConfig.h"
|
||||
* Make sure to include it before
|
||||
* #include <MySensor.h>
|
||||
* #include <MySensors.h>
|
||||
* Then adapt the contents to your personal preference.
|
||||
*/
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#ifndef MyProtocol_h
|
||||
#define MyProtocol_h
|
||||
|
||||
#include "MySensorCore.h"
|
||||
#include "MySensorsCore.h"
|
||||
|
||||
|
||||
// parse(message, inputString)
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include "MySensorCore.h"
|
||||
#include "MySensorsCore.h"
|
||||
|
||||
ControllerConfig _cc; // Configuration coming from controller
|
||||
NodeConfig _nc; // Essential settings for node to work
|
||||
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef MySensorCore_h
|
||||
#define MySensorCore_h
|
||||
#ifndef MySensorsCore_h
|
||||
#define MySensorsCore_h
|
||||
|
||||
#include "Version.h" // Auto generated by bot
|
||||
#include "MyConfig.h"
|
||||
@@ -146,10 +146,10 @@
|
||||
* @code{.cpp}
|
||||
* //#define MY_SIGNING_SOFT
|
||||
* #define MY_SIGNING_ATSHA204
|
||||
* #include <MySensor.h>
|
||||
* #include <MySensors.h>
|
||||
* ...
|
||||
* @endcode
|
||||
* Make sure to set the define before the inclusion of MySensor.h.
|
||||
* Make sure to set the define before the inclusion of MySensors.h.
|
||||
* It is legal to mix hardware- and software-based backends in a network. They work together.
|
||||
*
|
||||
* You also need to decide if the node (or gateway) in question require and verify signatures in addition to calculating them.
|
||||
@@ -172,7 +172,7 @@
|
||||
* #define MY_SIGNING_ATSHA204
|
||||
* #define MY_SIGNING_ATSHA204_PIN 4
|
||||
* #define MY_SIGNING_REQUEST_SIGNATURES
|
||||
* #include <MySensor.h>
|
||||
* #include <MySensors.h>
|
||||
* ...
|
||||
* @endcode
|
||||
* For the software backed signingbackend, an unconnected analog pin is required to set a random seed for the pseudo-random generator.
|
||||
@@ -185,7 +185,7 @@
|
||||
* #define MY_SIGNING_SOFT
|
||||
* #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7
|
||||
* #define MY_SIGNING_REQUEST_SIGNATURES
|
||||
* #include <MySensor.h>
|
||||
* #include <MySensors.h>
|
||||
* ...
|
||||
* @endcode
|
||||
*
|
||||
@@ -326,7 +326,7 @@
|
||||
* #define MY_SIGNING_ATSHA204
|
||||
* #define MY_SIGNING_REQUEST_SIGNATURES
|
||||
* #define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}},{.nodeId = 2,.serial = {0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09}}}
|
||||
* #include <MySensor.h>
|
||||
* #include <MySensors.h>
|
||||
* ...
|
||||
* @endcode
|
||||
* In this example, there are two nodes in the whitelist; the gateway, and a separate node that communicates directly with this node (with signed
|
||||
@@ -338,7 +338,7 @@
|
||||
* #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7
|
||||
* #define MY_SIGNING_REQUEST_SIGNATURES
|
||||
* #define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}},{.nodeId = 2,.serial = {0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09}}}
|
||||
* #include <MySensor.h>
|
||||
* #include <MySensors.h>
|
||||
* ...
|
||||
* @endcode
|
||||
*
|
||||
@@ -405,7 +405,7 @@
|
||||
* @code{.cpp}
|
||||
* #define MY_SIGNING_ATSHA204
|
||||
* #define MY_SIGNING_REQUEST_SIGNATURES
|
||||
* #include <MySensor.h>
|
||||
* #include <MySensors.h>
|
||||
* ...
|
||||
* @endcode
|
||||
* If you do also want your gateway to require signatures from your lock you just enable the same (or similar if using software signing) settings
|
||||
@@ -425,7 +425,7 @@
|
||||
* #define MY_SIGNING_SOFT
|
||||
* #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7
|
||||
* #define MY_SIGNING_REQUEST_SIGNATURES
|
||||
* #include <MySensor.h>
|
||||
* #include <MySensors.h>
|
||||
* ...
|
||||
* @endcode
|
||||
*
|
||||
@@ -435,7 +435,7 @@
|
||||
* #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7
|
||||
* #define MY_SIGNING_REQUEST_SIGNATURES
|
||||
* #define MY_SIGNING_NODE_WHITELISTING {{.nodeId = MOTION_SENSOR_ID,.serial = {0x12,0x34,0x56,0x78,0x90,0x12,0x34,0x56,0x78}}}
|
||||
* #include <MySensor.h>
|
||||
* #include <MySensors.h>
|
||||
* ...
|
||||
* @endcode
|
||||
|
||||
@@ -447,7 +447,7 @@
|
||||
* Configuration example for the keyfob (keyfob will only transmit to another node and not receive anything):<br>
|
||||
* @code{.cpp}
|
||||
* #define MY_SIGNING_ATSHA204
|
||||
* #include <MySensor.h>
|
||||
* #include <MySensors.h>
|
||||
* ...
|
||||
* @endcode
|
||||
*
|
||||
@@ -457,7 +457,7 @@
|
||||
* #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7
|
||||
* #define MY_SIGNING_REQUEST_SIGNATURES
|
||||
* #define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88}},{.nodeId = KEYFOB_ID,.serial = {<FROM ATSHA ON KEYFOB>}}}
|
||||
* #include <MySensor.h>
|
||||
* #include <MySensors.h>
|
||||
* ...
|
||||
* @endcode
|
||||
*
|
||||
@@ -475,7 +475,7 @@
|
||||
#ifndef MySigning_h
|
||||
#define MySigning_h
|
||||
|
||||
#include "MySensorCore.h"
|
||||
#include "MySensorsCore.h"
|
||||
#include "drivers/ATSHA204/ATSHA204.h"
|
||||
|
||||
#ifdef MY_SIGNING_NODE_WHITELISTING
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#define MyTransport_h
|
||||
|
||||
#include <stdint.h>
|
||||
#include "MySensorCore.h"
|
||||
#include "MySensorsCore.h"
|
||||
|
||||
// Search for a new parent node after this many transmission failures
|
||||
#define SEARCH_FAILURES 5
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
#define CHILD_ID_MQ 0
|
||||
/************************Hardware Related Macros************************************/
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
int BATTERY_SENSE_PIN = A0; // select the input pin for the battery sense point
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <Bounce2.h>
|
||||
|
||||
#define CHILD_ID 3
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@
|
||||
#include <Adafruit_NeoPixel.h>
|
||||
#include <MsTimer2.h>
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <Bounce2.h>
|
||||
|
||||
#define LED_CYCLE_MS 30 // Update rate of LEDs, in [ms].
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
#define SKETCH_NAME "Binary Sensor"
|
||||
#define SKETCH_MAJOR_VER "1"
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
#define CHILD_ID_AIQ 0
|
||||
#define AIQ_SENSOR_ANALOG_PIN 6
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#define MY_CORE_ONLY
|
||||
|
||||
#include <EEPROM.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
void setup()
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <DallasTemperature.h>
|
||||
#include <OneWire.h>
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
#define SN "DimmableLED"
|
||||
#define SV "1.1"
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
#define CHILD_ID_LIGHT 1
|
||||
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <Bounce2.h>
|
||||
#include <Encoder.h>
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <NewPing.h>
|
||||
|
||||
#define CHILD_ID 1
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
#define CHILD_ID_DUST 0
|
||||
#define DUST_SENSOR_ANALOG_PIN 1
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
#define CHILD_ID_DUST_PM10 0
|
||||
#define CHILD_ID_DUST_PM25 1
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
#define DIGITAL_INPUT_SENSOR 3 // The digital input you attached your light sensor. (Only 2 and 3 generates interrupt!)
|
||||
#define PULSE_FACTOR 1000 // Nummber of blinks per KWH of your meeter
|
||||
|
||||
@@ -51,7 +51,7 @@ const int offset = 1;
|
||||
|
||||
#include <SPI.h>
|
||||
#include <Time.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <TinyGPS++.h>
|
||||
#include <SoftwareSerial.h>
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
#include <SPI.h>
|
||||
#include <UIPEthernet.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
|
||||
void setup()
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
#include <ESP8266WiFi.h>
|
||||
#endif
|
||||
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
void setup() {
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
*/
|
||||
|
||||
#include <ESP8266WiFi.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
void setup() {
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
#include <ESP8266WiFi.h>
|
||||
#endif
|
||||
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
void setup() {
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
//#define MY_DEFAULT_TX_LED_PIN 5 // the PCB, on board LED
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
void setup() {
|
||||
// Setup locally attached sensors
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
#define MY_DEFAULT_TX_LED_PIN 6 // the PCB, on board LED
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
void setup() {
|
||||
// Setup locally attached sensors
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
#include <EthernetUdp.h>
|
||||
#endif
|
||||
#include <Ethernet.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
|
||||
void setup()
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
*/
|
||||
|
||||
#include <Ethernet.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
void setup() {
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
// MySensors libraries
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
// Child ID's of this node
|
||||
#define CHILD_1 1
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <DHT.h>
|
||||
|
||||
#define CHILD_ID_HUM 0
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <IRLib.h>
|
||||
|
||||
int RECV_PIN = 8;
|
||||
|
||||
@@ -93,7 +93,7 @@ Contributed by Jim (BulldogLowell@gmail.com) with much contribution from Pete (p
|
||||
#include <Wire.h>
|
||||
#include <Time.h>
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <LiquidCrystal.h>
|
||||
#include <LiquidCrystal_I2C.h>
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <BH1750.h>
|
||||
#include <Wire.h>
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
#define CHILD_ID_LIGHT 0
|
||||
#define LIGHT_SENSOR_ANALOG_PIN 0
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
// include Playing With Fusion AXS3935 libraries
|
||||
#include <PWFusion_AS3935.h>
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <MAX6675.h>
|
||||
|
||||
uint8_t CS0 = 4; // CS pin on MAX6675
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#define MY_NODE_ID 254
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
#define RADIO_ERROR_LED_PIN 4 // Error led pin
|
||||
#define RADIO_RX_LED_PIN 6 // Receive led pin
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
unsigned long SLEEP_TIME = 120000; // Sleep time between reports (in milliseconds)
|
||||
#define DIGITAL_INPUT_SENSOR 3 // The digital input you attached your motion sensor. (Only 2 and 3 generates interrupt!)
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
#define MY_RS485_BAUD_RATE 9600
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
unsigned long SLEEP_TIME = 120000; // Sleep time between reports (in milliseconds)
|
||||
#define DIGITAL_INPUT_SENSOR 3 // The digital input you attached your motion sensor. (Only 2 and 3 generates interrupt!)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <Oregon.h>
|
||||
|
||||
//Define pin where is 433Mhz receiver (here, pin 2)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
#define COMPARE_PH 1 // Send PH only if changed? 1 = Yes 0 = No
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#endif
|
||||
|
||||
#define NEO_PIN 4 // NeoPixels input pin
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include "MYSLog.h"
|
||||
|
||||
#define VSN "v1.0"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <Wire.h>
|
||||
#include <Adafruit_BMP085.h>
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <Wire.h>
|
||||
#include <PN532_I2C.h>
|
||||
#include <PN532.h>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
// Arduino pin attached to MOSFET Gate pin
|
||||
#define RED_PIN 3
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
//#define MY_NODE_ID 7
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <math.h>
|
||||
#include <Time.h>
|
||||
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <Time.h>
|
||||
#include <DS3232RTC.h> // A DS3231/DS3232 library
|
||||
#include <Wire.h>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#define MY_REPEATER_FEATURE
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
#define RELAY_1 3 // Arduino Digital I/O pin number for first relay (second on pin+1 etc)
|
||||
#define NUMBER_OF_RELAYS 1 // Total number of attached relays
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#define MY_REPEATER_FEATURE
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <Bounce2.h>
|
||||
|
||||
#define RELAY_PIN 4 // Arduino Digital I/O pin number for relay
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#define MY_REPEATER_FEATURE
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
void setup() {
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
#include <SPI.h>
|
||||
#include <SoftwareSerial.h>
|
||||
#include <Adafruit_FONA.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
// Pin definitions and other defines
|
||||
#define FONA_RX 2
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
|
||||
#define CHILD_ID 99 // Id of the sensor child
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
#define MY_SIGNING_ATSHA204_PIN 17 //!< A3 - pin where ATSHA204 is attached
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
|
||||
#define LOCK_1 3 //!< Arduino Digital I/O pin number for first lock (second on pin+1 etc)
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
#include <sha204_library.h>
|
||||
#include <sha204_lib_return_codes.h>
|
||||
#define MY_CORE_ONLY
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
// Doxygen specific constructs, not included when built normally
|
||||
// This is used to enable disabled macros/definitions to be included in the documentation as well.
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
#define SketchName "Sensebender Blink"
|
||||
#define SketchVersion "20150721"
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
#define MY_OTA_FIRMWARE_FEATURE
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <Wire.h>
|
||||
#include <SI7021.h>
|
||||
#ifndef MY_OTA_FIRMWARE_FEATURE
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <Servo.h>
|
||||
|
||||
#define SERVO_DIGITAL_OUT_PIN 3
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
#include <math.h> // Conversion equation from resistance to %
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
// Setting up format for reading 3 soil sensors
|
||||
#define NUM_READS 10 // Number of sensor reads for filtering
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <Time.h>
|
||||
|
||||
boolean timeReceived = false;
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@
|
||||
|
||||
#include <Time.h>
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <stdarg.h>
|
||||
#include <UTFT.h>
|
||||
#include <UTouch.h>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
#define UV_SENSOR_ANALOG_PIN 0
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
#include <Wire.h>
|
||||
|
||||
#define CHILD_ID_VIBRATION 0
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
#define DIGITAL_INPUT_SENSOR 3 // The digital input you attached your sensor. (Only 2 and 3 generates interrupt!)
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
//#define MY_RADIO_RFM69
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
#include <Wire.h>
|
||||
#include <Adafruit_BMP085.h>
|
||||
|
||||
+1
-1
@@ -35,4 +35,4 @@
|
||||
#endif
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
+1
-1
@@ -35,4 +35,4 @@
|
||||
#endif
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
+1
-1
@@ -36,4 +36,4 @@
|
||||
#define MY_NODE_LOCK_FEATURE
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
+1
-1
@@ -36,4 +36,4 @@
|
||||
#define MY_RF24_ENABLE_ENCRYPTION
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
+1
-1
@@ -36,4 +36,4 @@
|
||||
#define MY_RFM69_ENABLE_ENCRYPTION
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
+1
-1
@@ -35,4 +35,4 @@
|
||||
#endif
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
+1
-1
@@ -35,4 +35,4 @@
|
||||
#endif
|
||||
|
||||
#include <SPI.h>
|
||||
#include <MySensor.h>
|
||||
#include <MySensors.h>
|
||||
|
||||
@@ -307,14 +307,14 @@ int FindSensor (const int id, int maxsensor)
|
||||
{
|
||||
int EepromId=0;
|
||||
for (int i=0; i<maxsensor; i++){
|
||||
#ifdef MySensor_h
|
||||
#ifdef MySensors_h
|
||||
int SensorID = loadState(i);
|
||||
#else
|
||||
int SensorID = EEPROM.read(i);
|
||||
#endif
|
||||
if(SensorID == 255)
|
||||
{
|
||||
#ifdef MySensor_h
|
||||
#ifdef MySensors_h
|
||||
saveState(i,id);
|
||||
#else
|
||||
EEPROM.write(i,id);
|
||||
|
||||
Reference in New Issue
Block a user