RF24 moved to utility folder of library. This results in one less include in sketches!

Serial flush in sleep method also means one less code in examples.
Removed set(bool) in message. Not needed. getBool just calls getInt
__attribute__((packed)) for RPI compability
Print more info in send/read debug prints.
Get internalTemp returns full degrees and uses longer Vref delay
Fix debug print gateway prepend (wrong command/type)
Fixed problem in RelayWithButton example. Now working with ack in both directions.
Serial protocol changed (incoming serial message have an new ack-parameter)
This commit is contained in:
Henrik Ekblad
2014-06-17 22:16:38 +02:00
parent 90f79c97cd
commit c332667a8d
30 changed files with 2691 additions and 121 deletions
@@ -1,12 +1,11 @@
#include <SPI.h>
#include <RF24.h>
#include <MySensor.h>
#include <DHT.h>
#define CHILD_ID_HUM 0
#define CHILD_ID_TEMP 1
#define HUMIDITY_SENSOR_DIGITAL_PIN 3
unsigned long SLEEP_TIME = 30; // Sleep time between reads (in seconds)
unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)
MySensor gw;
DHT dht;
@@ -59,9 +58,7 @@ void loop()
Serial.println(humidity);
}
delay(300); //delay to allow serial to fully print before sleep
gw.sleep(SLEEP_TIME * 1000); //sleep a bit
gw.sleep(SLEEP_TIME); //sleep a bit
}