Closed jamie-54 closed 7 months ago
Hi all, not sure what happened to old PR for this, I was trying to merge dev but whatever happened it was saying it there was 100+ file changes so I forced pushed back to the correct branch.
Anyway here is the new class for the Evo sensor I based it of the anemometer.py
file and it has been tested and works
May I ask what is this file
data_processor_and_filters.py
for and is it available for both the old and new sensor?
It works for new sensor but should work for both, it can be used to take a moving average for measurements. I've updated the PR description which should help explain
Main Changes
A class
EvoSensor
has been developed based of theAnemometer
class and the Terabee sample_code repo.Data acquisition happens in background Data is kept in a buffer
A separate file
data_logger.py
has been created to save recorded data that can be used for the anemometer and the TOF sensor.filters.py
has been updated to include 3 different filters that can be used for the anemometer and the TOF sensor.Example
filename
is used to save the file as the current date and time.processor
is set toMedianFilter()
.When the
EvoSensor
class is called withwindow_length=3
andprocessor = MedianFilter()
, every time a new measurement is received the median average well be determined from the current measurement and previous 2 measurements (3 in total). The for loop is used to print the current reading every second for 20 times and the sensor will collect data for a minuteTests
This has been tested and works well at 15m and 60m one.