diff --git a/arduino/davis_receiver.ino b/arduino/davis_receiver.ino index 682585d..6d11c88 100644 --- a/arduino/davis_receiver.ino +++ b/arduino/davis_receiver.ino @@ -1,18 +1,10 @@ /* - Davis logger with Wifi esp8266 as bridge. + Davis logger */ // připojení potřebných knihoven #include -#include -#include -#include -HTU21D sensorHTU; - -#define BMP280_ADDRESS (0x76) -Adafruit_BMP280 bmp; -int height = 450; #include "Davis.h" #include "SPI.h" @@ -28,11 +20,7 @@ void setup() delay(100); Radio.begin(); Radio.rx(); - if (!bmp.begin(BMP280_ADDRESS)) { - Serial.println("BMP280 sensor not found, check wires!"); - while (1); - } - sensorHTU.begin(); + Serial.println("Done Setup"); } @@ -65,15 +53,7 @@ void printPacket(void) package[13] = freqError; package[14] = next; package[15] = pktCount; - float tempBMP = bmp.readTemperature(); - float pressBMP = (bmp.readPressure()/100.00); - float sea_level = pressBMP * pow((1 - (0.0065 * height) / (tempBMP + 0.0065 * height + 273.15)), -5.257); - delay(100); - float htu_tmp = sensorHTU.readTemperature(); - float htu_humi = sensorHTU.readHumidity(); - if (htu_tmp > 125 | htu_humi > 100) { - Serial.println("Sensor HTU21D communication error!"); - } + String data = "{'hop':" + String(package[0]) + "," + "'h':" + String(package[1]) + "," + "'b0':" + String(package[2]) + "," + @@ -86,11 +66,6 @@ void printPacket(void) "'b7':" + String(package[9]) + "," + "'b8':" + String(package[10]) + "," + "'b9':" + String(package[11]) + "," + - "'Ti':" + String(tempBMP) + "," + - "'P':" + String(pressBMP) + "," + - "'P0':" + String(sea_level) + "," + - "'Thtu':" + String(htu_tmp) + "," + - "'Hhtu':" + String(htu_humi) + "," + "'rssi':" + String(package[12]) + "," + "'lqi':" + String(package[13]) + "," + "'nxt':" + String(package[14]) + "," + diff --git a/python/davis_etl.py b/python/davis_etl.py index 0c56826..9a70bdb 100755 --- a/python/davis_etl.py +++ b/python/davis_etl.py @@ -311,7 +311,6 @@ if '__main__': raw_winddir = davis_data['b1'] wind = davis_decoder.decode_wind({"windspeed": raw_windspeed, "winddir": raw_winddir}) - influx_weather_write = davis_writer.base_construct( { "speed": float(wind['speed']), "direction": float(wind['direction'])}