The analog values were off significantly. (The temperature here is about 20C I was getting readings as high as 40C, and my average readings were about 6C high)
Eventually I started using the TMP36 object in the NETMF toolbox, but originally I was trying to do it myself. What I saw was that when I did an AnalogInput.ReadRaw() sometimes I was getting values significantly higher than 1023. I presumed that this was related to the bitwise precision of the AnalogInput object so I tried instantiating it with:
AnalogInput input = new AnalogInput(AnalogChannels.ANALOG_PIN_A1, 10);
But this caused it to throw an Invalid Argument Exception. I'm not sure if that's necessary or not. (The documentation for the AnalogInput constructor is a bit borked)
I checked bus voltage, and with and with-out the LCD I was reading exactly 3.30v.
- Can I connect things to the 3.3V header while the microcontroller is running?
- Would I be better off powering the LCD using the 5V header and voltage dividing resistors?
As for the LCD, it's being driven by the NETMF SerialPort object. Which I presume is just a 9600bps serial port transmitting out GPIO1.
Thanks so much for your help!
-Z