Default channel should be 76 (not the presumed 70)
This commit is contained in:
@@ -40,7 +40,7 @@ class Gateway : public Relay
|
|||||||
Gateway(uint8_t _cepin, uint8_t _cspin, uint8_t _inclusion_time, uint8_t _inclusion_pin, uint8_t _rx, uint8_t _tx, uint8_t _er);
|
Gateway(uint8_t _cepin, uint8_t _cspin, uint8_t _inclusion_time, uint8_t _inclusion_pin, uint8_t _rx, uint8_t _tx, uint8_t _er);
|
||||||
|
|
||||||
/* Use this and pass a function that should be called when you want to process commands that arrive from radio network */
|
/* Use this and pass a function that should be called when you want to process commands that arrive from radio network */
|
||||||
void begin(rf24_pa_dbm_e paLevel=RF24_PA_MAX, uint8_t channel=70, void (*dataCallback)(char *)=NULL);
|
void begin(rf24_pa_dbm_e paLevel=RF24_PA_MAX, uint8_t channel=76, void (*dataCallback)(char *)=NULL);
|
||||||
|
|
||||||
void processRadioMessage();
|
void processRadioMessage();
|
||||||
void parseAndSend(char *inputString);
|
void parseAndSend(char *inputString);
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class Relay : public Sensor
|
|||||||
*/
|
*/
|
||||||
Relay(uint8_t _cepin = 9, uint8_t _cspin = 10);
|
Relay(uint8_t _cepin = 9, uint8_t _cspin = 10);
|
||||||
|
|
||||||
void begin(uint8_t radioId=AUTO, rf24_pa_dbm_e paLevel=RF24_PA_MAX, uint8_t channel=70);
|
void begin(uint8_t radioId=AUTO, rf24_pa_dbm_e paLevel=RF24_PA_MAX, uint8_t channel=76);
|
||||||
boolean messageAvailable();
|
boolean messageAvailable();
|
||||||
boolean send(message_s message, int length);
|
boolean send(message_s message, int length);
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include <avr/pgmspace.h>
|
#include <avr/pgmspace.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
//#define DEBUG
|
#define DEBUG
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#define debug(x,...) debugPrint(x, ##__VA_ARGS__)
|
#define debug(x,...) debugPrint(x, ##__VA_ARGS__)
|
||||||
@@ -136,7 +136,7 @@ class Sensor : public RF24
|
|||||||
* @param paLevel Radio PA Level for this sensor. Default RF24_PA_MAX
|
* @param paLevel Radio PA Level for this sensor. Default RF24_PA_MAX
|
||||||
* @param channel Radio channel. Default RF24_PA_MAX
|
* @param channel Radio channel. Default RF24_PA_MAX
|
||||||
*/
|
*/
|
||||||
void begin(uint8_t radioId=AUTO, rf24_pa_dbm_e paLevel=RF24_PA_MAX, uint8_t channel=70);
|
void begin(uint8_t radioId=AUTO, rf24_pa_dbm_e paLevel=RF24_PA_MAX, uint8_t channel=76);
|
||||||
|
|
||||||
uint8_t getRadioId();
|
uint8_t getRadioId();
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#define RELAY_ON 0
|
#define RELAY_ON 0
|
||||||
#define RELAY_OFF 1
|
#define RELAY_OFF 1
|
||||||
|
|
||||||
Relay gw;
|
Sensor gw;
|
||||||
|
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
@@ -20,7 +20,6 @@ void setup()
|
|||||||
for (int i=0; i<NUMBER_OF_RELAYS;i++) {
|
for (int i=0; i<NUMBER_OF_RELAYS;i++) {
|
||||||
gw.sendSensorPresentation(RELAY_1+i, S_LIGHT);
|
gw.sendSensorPresentation(RELAY_1+i, S_LIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetch relay status
|
// Fetch relay status
|
||||||
for (int i=0; i<NUMBER_OF_RELAYS;i++) {
|
for (int i=0; i<NUMBER_OF_RELAYS;i++) {
|
||||||
// Make sure relays are off when starting up
|
// Make sure relays are off when starting up
|
||||||
|
|||||||
Reference in New Issue
Block a user