I’m trying to implement the Sparkfun weather meter
connected to a Sparkfun WeatherShield to a Multitech UDK2 with mDot.
I have found some sample code but haven’t gotten it to work fully. Currently, I am looking at the weather vane (wind direction) capability which requires the mDot to read an analog voltage and do some magic to determine the direction.
I’ve used AnalogIn in the past to read the light level on the WeatherShield with no problem.
However, trying to read the voltage from the weather vane is unreliable. With the weather vane in a fixed position (“north” relative), using a DVM I can measure 3.60V on the Weather Shield and mDot’s pin20 (AD0 / PB_1).
In turn, I believe I should get back 0.72f (=5V/3.6V) from a read() of that analog input. Sometimes I do, but often I get back a 1.0. This never happened with the light level implementation mentioned earlier.
Any ideas?
-
This topic was modified 8 years, 10 months ago by
Michael.
-
This topic was modified 8 years, 10 months ago by
Michael.