I am interfacing a wind vane and anemometer with the arduino.
I currently have everything setup and working. The issue however is that the wind vane is giving sloppy readings. I have it setup to give an analog reading of 0-1024 based on its position. It works great except for the fact that it is giving lots of sporadic 72s and 0s. Any suggestions?
Also - why only limit yourself to 8 cardinal directions? Instead of using the resistor array you have set up, print out on transparency sheets a variable density radial circle filter wheel (think of a radar sweep circle - for instance, dark at 12 o'clock, and as you sweep around clockwise, the darkness falls off linearly until it is clear/mostly clear @ 11:59); then, use a phototransistor or LDR to measure light as it falls through it - the variable density of the filter wheel would act as an optical 360 degree "potentiometer"...
You analogRead is incorrect. The first time you will read from aport 0. You then overwrite the variable with the result. Next time you read from a random value.
Just out of curiosity, has anyone tried this device?
#include <obvious_smart-assed_remark.txt>
I've seen a few postings from people who've used various forms of SoftPot/HotPot. Can't remember whether they were favorable comments, offhand, but a forum search should turn them up.
The problem with using them for wind direction is that the drag from whatever you used to press on the HotPot would probably give you bogus direction readings at low wind speeds.