When I read from the analog ports I always get 1023 as an output. Sometimes the value will flicker briefly but it is always less than a second and goes right back to 1023. I've tried the angle sensor, light sensor, and thermistor and no matter which analog port I use I always have an output of 1023.
Searching this board and the internet I saw that a common problem was cross wiring the AREF to the in use voltage, but given that this shield chassis uses all pins I don't really know what to try. Additionally, using analog ports 2-5 on the shield gives the output of 1023, but using the analog port 1 gives a runtime error while debugging. Here is an example of the code, currently using analog 5. If I change it to 0 or 1 I get a run time error. I guess I'm not really sure how the pins 0-5 are mapped to 1-5.
AnalogInput tempSensor = new AnalogInput(Pins.GPIO_PIN_A5); // set up the LCD's number of columns and rows: lcd.Begin(16, 2); // Print a message to the LCD. lcd.Write("Input:"); while (true) { // set the cursor to column 0, line 1 lcd.SetCursorPosition(0, 1); // print the number of seconds since reset: lcd.Write(tempSensor.Read().ToString()); Thread.Sleep(100); }
I'm sure it's probably some newbie error, so I appreciate any help or suggestions anyone has to offer, hopefully I'm not making a glaring RTM mistake.