Commit 4e91a486 authored by Rousseau Vincent's avatar Rousseau Vincent
Browse files

Generate a value every minute

No related merge requests found
Showing with 4 additions and 4 deletions
+4 -4
......@@ -19,8 +19,8 @@ def get_data():
temp_humidity = []
pressure = []
temp_pressure = []
# Store sensor values every second during one hour
for _ in range(3600):
# Store sensor values every second during one minute
for _ in range(60):
humidity.append(sense.get_humidity())
temp_humidity.append(sense.get_temperature_from_humidity())
pressure.append(sense.get_pressure())
......@@ -29,8 +29,8 @@ def get_data():
#print("Humidity sensor : {} %rH , {} °C".format(humidity, temp_humidity))
#print("Pressure sensor : {} Millibars , {} °C".format(pressure, temp_pressure))
# Get the mean value during the hour
return [(datetime.now()-timedelta(minutes=30)).timestamp(),
# Get the mean value during the minute
return [(datetime.now()-timedelta(seconds=30)).timestamp(),
float_mean(humidity),
float_mean(temp_humidity),
float_mean(pressure),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment