Hi guys,
I’m very new here and I’ve just started with .NET gadgeteer within my VS2010 trying to connect the EBlock Expansion Module to socket 9 of Spider mainboard. I’ve tried to run very simple code using the emulator:
[Code]
AnalogInput analogInput =
eBlockExpansion.SetupAnalogInput(Gadgeteer.Socket.Pin.Three);
while (true)
{
Debug.Print("Analog input voltage: " + analogInput.ReadVoltage());
Thread.Sleep(300);
}
[/Code]
Reading the voltage ends up with with an exception. I have this as output details:
Using mainboard GHIElectronics-FEZSpider version 1.0
Program Started
#### Exception System.NotSupportedException - CLR_E_NOT_SUPPORTED (1) ####
#### Message:
#### GHIElectronics.Gadgeteer.EMX_AIN::set_Active [IP: 0013] ####
#### GHIElectronics.Gadgeteer.EMX_AIN::ReadVoltage [IP: 0005] ####
#### Gadgeteer.Interfaces.AnalogInput::ReadVoltage [IP: 0007] ####
#### GadgeteerApp1.Program::ProgramStarted [IP: 002d] ####
#### GadgeteerApp1.Program::Main [IP: 0015] ####
A first chance exception of type ‘System.NotSupportedException’ occurred in GHIElectronics.Gadgeteer.FEZSpider.dll
I know I have nothing connected to pin3 of the button expansion module, so is it normal to get such exception in that case?
Thanks.