Height: 8.9 cm
Length: 17.8 cm
Maximum accuracy: 22.5º
Resistance range: 688 Ω ~ 120 kΩ
The wind vane consists of a basement that turns freely on a platform endowed with a net of eight resistances connected to eight switches that are normally
open and are closed (one or two) when a magnet in the basement acts on them. This permits us to distinguish up to 16 different positions
(the equivalent to a resolution of 22.5º). The equivalent resistance of the wind vane, along with a 10 kΩ resistance, form a voltage divider, powered at 3.3 V,
of which the output can be measured in an analog input of the microcontroller. The function of the library readValue also stores in variable vane direction an
8 bits value which corresponds with an identifier of the pointing direction. Below, a table with the different values that the equivalent resistance of the wind
vane may take is shown, along with the direction corresponding to each value:
Besides, it is recommended to use the function getVaneFiltered in order to perform a mean filtered measurement during a specified period of time.
Thus, mechanical fluctuations will be avoided and a more accurate measurement will be done.