Struggling Reading Analogue Channels

I am trying to read the analogue channels on my Meadow using the following:

_supplyVoltageAnalogue = Device.CreateAnalogInputPort( Device.Pins.A01 );
_supplyVoltageAnalogue.Updated += ( s, result ) =>
{
    _voltages.supplyVolts = result.New.Volts;
    Console.WriteLine( $"Supply:{_voltages.supplyVolts}" );
};
 _supplyVoltageAnalogue.StartUpdating();

It never seems to call the Updated delegate.
Am I missing something?

Andy

Never mind, I was doing a very stupid thing :roll_eyes:

Andy

1 Like