Hello,
I have an analog wind direction sensor that has an output of 0 - 5 V for 360° representing the position of the arrow from the north pole. Which is actually 5V divided by 8 resistor values giving me the output voltage value for each azimuth.
But those wind sensor azimuth is actually the opposite of the wind flow…
When it has the arrow toward the North [0°] it is meaning that the wind is flowing from the north to the south. So opposite is what is needed to visualize.
Arrow into 45° > meaning the wind going towards 225 ° > SW .
Or how do you visualize that arrow of the wind direction? Because if I will make it the same as the compass then it will be confusing…
If you want to display in HA - an example is given above. For display on an attached display there are some examples about - let me know and I’ll point you to one.
I didn´t make research on the problem before i ordered the sensor.
But because resistance is not raising linear to easily calculate the angle because it is changing voltage in steps represents ± 50 - 55°… so i had to correct them by some if conditions to the real comass
I am not a good coder so I am using usually hard invented solution which is possible to do simpler, but it works
And yes I will be glad if you will help me with the visual solution.
Bdw question 2, the best way to store those data into influxdb ? I am planing to make grafana dashboards as my primary source data from the sensors what i am creating now.
Can i control for example write temperatures every 10 minutes, and and wind speed every minute ?
Or what is the best metod to store wind related data ? Some avarage / and maximum values every 10 min ?