Analog Input 0 problem with Rhino

Hi,

When I connect AD0 (Pin4) to +3.3V and run sample code, I obtain :

[quote]206
3
193
93
87
48
61
90
61[/quote]

When I connect AD0 (Pin4) to GND and run sample code, I obtain :

[quote]0
0
0
0
0
0
0
0
0[/quote]

My sample test code

using System;
using System.Threading;
using Microsoft.SPOT;
using GHIElectronics.NETMF.FEZ;
using GHIElectronics.NETMF.Hardware;

namespace Test
{
    public class Program
    {
        public static void Main()
        {
            AnalogIn lightSensor = new AnalogIn((AnalogIn.Pin)FEZ_Pin.AnalogIn.AD0);
            lightSensor.SetLinearScale(0, 3300);

            int lightSensorReading = 0;
            while (true)
            {
                lightSensorReading = lightSensor.Read();
                Debug.Print(lightSensorReading.ToString());
                Thread.Sleep(500);
            }
        }

    }
}

If I try same test with AD1 I obtain excpected 3300 value for +3.3V and 0 for GND.

Why AD0 read wrong value ?

Bad connection on that pin maybe?

When you write I just try to re soldering my pin.

And now it’s work :slight_smile:

Thx for your answer.

You are welcome! I am glad it is working. :slight_smile: