I am currently trying to migrate the weather station project to a Cobra II with wifi and get this exception when I do a analogRead?
Code is below exception? I assume I am not declaring correctly?
Measurement Start
#### Exception System.ArgumentException - 0x00000000 (1) ####
#### Message:
#### Microsoft.SPOT.Hardware.AnalogInput::.ctor [IP: 0076] ####
#### Gadgeteer.SocketInterfaces.NativeAnalogInput::set_IsActive [IP: 002e] ####
Gadgeteer.SocketInterfaces.NativeAnalogInput::ReadVoltage [IP: 0005]
#### wifi.Program::measurementTimer_Tick [IP: 0014] ####
#### Microsoft.SPOT.DispatcherTimer::FireTick [IP: 0010] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 001d] ####
A first chance exception of type ‘System.ArgumentException’ occurred in Microsoft.SPOT.Hardware.dll
Exception performing Timer operation
Network availability: True
LinkedConnected: True
Network Availability Changed IP Address = 0.0.0.0
CODE:
Variables
GT.SocketInterfaces.AnalogInput windDirection;
SetupPeripherals
windDirection = extender_Four.CreateAnalogInput(GT.Socket.Pin.Five); extender_Four is plugged into a socket with AIT ‘A for analog I hope’ I assume this is not the correct method for 4.3? Or declared correctly?
private void ProcessMeasurements()
{
double dir = windDirection.ReadVoltage(); and it bombs on this line?