On my G120E all analog inputs except analog 1 are reading zero, no 1 full scale.
The same “program” on a EMX is ok.
The voltage on P0_12 is 1.5V.
public class Program
public static void Main()
// AnalogInput Ain = new AnalogInput((Cpu.AnalogChannel)6);
// AnalogInput Ain = new AnalogInput(GHI.Pins.G120E.AnalogInput.P0_12);
AnalogInput Ain = new AnalogInput(GHI.Pins.EMX.AnalogInput.IO45);
x = Ain.Read();
Am I missing something?
@ Dig Kleppe - Do you have a G120E Dev Board or FEZ Spider II you can try your code on to verify it is not an issue in your design?
Was this resolved?
I have seen similar things with the G120.
It is totally intermittent and seems like a power/G120 boot-up race condition or something.
Anyway I will power-up the device, and only sometimes do my analogs read 0.
To fix this I can reboot the G120 (not power cycle) and the analogs come back.
Any idea on how to fix?
@ mhardy - We have not been able to reproduce this ourselves yet unfortunately.