I am a newbie in the world of Raspberry and I have seen there are several solutions for reading analog, this example for measuring temperature:
http://raspberrypi.powersbrewery.com/pr ... hermistor/ Is is very simple to understand, discharging, wait and charge and read the time takes to charge.
I have made the following code:
public void Charge()
pulseLength = new Stopwatch();
while(SecondGpio.Read() == GpioPinValue.Low)
Temperature = pulseLength.Elapsed.TotalMilliseconds;
private void Discharge()
public async void Initialize()
And I get this random values 2.6,2.6,1.9,1.9,2.6,2.6,10.6,10.6 really random.
Might be I need to use ValueChanged, but I am not sure what is the best way to follow, any idea how to solve that?