Adding defines for different board layouts in MyConfig
Adjusted all Gateway examples but only one sensor example so far (DallasTemperature). Other sensor examples should get the same three lines added (not mandatory but helps avoiding unnecessary debugging when selecting the wrong setup)
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
#include <DallasTemperature.h>
|
||||
#include <OneWire.h>
|
||||
|
||||
#ifndef MYSENSORS_SENSOR
|
||||
#error Please switch to MYSENSORS_SENSOR in MyConfig.h
|
||||
#endif
|
||||
|
||||
#define ONE_WIRE_BUS 3 // Pin where dallase sensor is connected
|
||||
#define MAX_ATTACHED_DS18B20 16
|
||||
unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)
|
||||
|
||||
@@ -56,6 +56,9 @@
|
||||
#include <PinChangeInt.h>
|
||||
#include "GatewayUtil.h"
|
||||
|
||||
#ifndef MYSENSORS_ETHERNET_MQTT_GATEWAY
|
||||
#error Please switch to MYSENSORS_ETHERNET_MQTT_GATEWAY in MyConfig.h
|
||||
#endif
|
||||
|
||||
// Use this if you have attached a Ethernet ENC28J60 shields
|
||||
#include <UIPEthernet.h>
|
||||
|
||||
@@ -62,6 +62,9 @@ http://forum.mysensors.org/topic/303/mqtt-broker-gateway
|
||||
#include <Ethernet.h>
|
||||
#include "MyMQTT.h"
|
||||
|
||||
#ifndef MYSENSORS_ETHERNET_MQTT_GATEWAY
|
||||
#error Please switch to MYSENSORS_ETHERNET_MQTT_GATEWAY in MyConfig.h
|
||||
#endif
|
||||
|
||||
#define INCLUSION_MODE_TIME 1 // Number of minutes inclusion mode is enabled
|
||||
#define INCLUSION_MODE_PIN 3 // Digital pin used for inclusion mode button
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
|
||||
* - ERR (red) - fast blink on error during transmission error or recieve crc error
|
||||
*/
|
||||
|
||||
|
||||
#define NO_PORTB_PINCHANGES
|
||||
|
||||
#include <SPI.h>
|
||||
@@ -30,6 +30,9 @@
|
||||
#include <PinChangeInt.h>
|
||||
#include "GatewayUtil.h"
|
||||
|
||||
#ifndef MYSENSORS_SERIAL_GATEWAY
|
||||
#error Please switch to MYSENSORS_SERIAL_GATEWAY in MyConfig.h
|
||||
#endif
|
||||
|
||||
#define INCLUSION_MODE_TIME 1 // Number of minutes inclusion mode is enabled
|
||||
#define INCLUSION_MODE_PIN 3 // Digital pin used for inclusion mode button
|
||||
|
||||
Reference in New Issue
Block a user