baud rate, all in one msg etc
This commit is contained in:
parent
fd9aad5e2f
commit
35410251c2
|
|
@ -13,7 +13,7 @@
|
|||
* Baud Rate for the 433 Mhz connection.
|
||||
* Caution: Must be the same for sender & receiver!
|
||||
**/
|
||||
#define RH_SPEED 300
|
||||
#define RH_SPEED 2000
|
||||
|
||||
/**
|
||||
* Pin for the receiver
|
||||
|
|
@ -65,7 +65,7 @@ long lastMillis = 0;
|
|||
void handleRoot(); // function prototypes for HTTP handlers
|
||||
void handleNotFound();
|
||||
void reconnect();
|
||||
String SendHTML(float Temperaturestat, float Humiditystat);
|
||||
String SendHTML();
|
||||
void publishData(float temp, float humid, float soil, long battery);
|
||||
void callback(char *inTopic, byte *payload, unsigned int length);
|
||||
|
||||
|
|
@ -241,7 +241,7 @@ void callback(char *inTopic, byte *payload, unsigned int length)
|
|||
|
||||
void handleRoot()
|
||||
{
|
||||
server.send(200, "text/html", SendHTML(Temperature, Humidity));
|
||||
server.send(200, "text/html", SendHTML());
|
||||
}
|
||||
|
||||
void handleNotFound()
|
||||
|
|
@ -269,7 +269,7 @@ void publishData(float temp, float humid, float soil, long battery)
|
|||
yield();
|
||||
}
|
||||
|
||||
String SendHTML(float Temperaturestat, float Humiditystat)
|
||||
String SendHTML()
|
||||
{
|
||||
String ptr = "<!DOCTYPE html> <html>\n";
|
||||
ptr += "<head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=no\">\n";
|
||||
|
|
@ -285,11 +285,17 @@ String SendHTML(float Temperaturestat, float Humiditystat)
|
|||
ptr += "<h1>Wiesendamm Wetter Report</h1>\n";
|
||||
|
||||
ptr += "<p>Temperature: ";
|
||||
ptr += (float)Temperaturestat;
|
||||
ptr += (float)Temperature;
|
||||
ptr += " C</p>";
|
||||
ptr += "<p>Humidity: ";
|
||||
ptr += (float)Humiditystat;
|
||||
ptr += (float)Humidity;
|
||||
ptr += " %</p>";
|
||||
ptr += "<p>Soil Humidity: ";
|
||||
ptr += (float)SoilHumidity;
|
||||
ptr += " %</p>";
|
||||
ptr += "<p>Battery: ";
|
||||
ptr += (float)battery;
|
||||
ptr += " mV</p>";
|
||||
|
||||
ptr += "</div>\n";
|
||||
ptr += "</body>\n";
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#define RH_OWN_ADDR 0xca // 202
|
||||
|
||||
// RadioHead bitrate in bit/s
|
||||
#define RH_SPEED 300
|
||||
#define RH_SPEED 2000
|
||||
|
||||
/*
|
||||
define when to wake up
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
#define WATCHDOG_WAKEUP 9
|
||||
|
||||
// Sleep this many again before waging up. Sleep time in s = WATCHDOG_WAKEUP s * WATCHDOG_SLEEP_FURTHER, e.g. 8*8s = 64s
|
||||
#define WATCHDOG_SLEEP_FURTHER 2
|
||||
#define WATCHDOG_SLEEP_FURTHER 8
|
||||
|
||||
// pins for the radio hardware
|
||||
#define RH_RX_PIN 6 // not used, set to a non-existent pin
|
||||
|
|
|
|||
Loading…
Reference in New Issue