I'm having a bit of trouble getting my a/d working just right. I have an LM34 connected to GPIO.0 and a pot feeding 2.55 volts to Vref pin GPIO.1
I am trying to turn on a relay connected to GPIO.5 based on the temperature reading.h
I don't think I have the a/d bits set correctly. It appears to still think it is 10 bit but I want it set to 8.
Can you please look at my short code and tell me where I have gone astray.
If you look at the txt file attached, you'll note that I have the relay turning on when my a/d result is > 330.
By measuring the voltages and doing some math... that's right where it would be if the A/D was 10 bit. And it does work. The relay turns on and off when I touch the temperature sensor.
Help please! :-)
Thank you!
Ross
Never enough knowledge to be called intelligent but just enough knowledge to be considered dangerous!
Bookmarks