Initial commit
This commit is contained in:
commit
f83dd4f105
36 changed files with 3704 additions and 0 deletions
28
lib/SensorTransmitter/examples/ThermoHygroTransmitter.ino
Normal file
28
lib/SensorTransmitter/examples/ThermoHygroTransmitter.ino
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* This sketch sends (bogus) thermo / hygro data to a remote weather sensors made by Cresta.
|
||||
*
|
||||
* Setup:
|
||||
* - connect transmitter input of a 433MHz transmitter to digital pin 11
|
||||
* - On the weather station, activate the "scan" function for channel 1.
|
||||
*/
|
||||
|
||||
#include <SensorTransmitter.h>
|
||||
|
||||
// Initializes a ThermoHygroTransmitter on pin 11, with "random" ID 0, on channel 1.
|
||||
ThermoHygroTransmitter transmitter(4, 0, 1);
|
||||
|
||||
void setup() {
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// Displays temperatures from -10 degrees Celsius to +20,
|
||||
// and humidity from 10% REL to 40% REL, with increments of 2
|
||||
for (int i = -10; i<=20; i+=2) {
|
||||
// Temperatures are passed at 10 times the real value,
|
||||
// to avoid using floating point math.
|
||||
transmitter.sendTempHumi(i * 10, i + 20);
|
||||
|
||||
// Wait two seconds before sending next.
|
||||
delay(2000);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue