Debugging EBlock Expansion Module in the emulator

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.

Welcome to the forum. The emulator does not know what to do with the code you are giving it. It can only emulate very basic “hardware”, like the buttons and screen you see on it. So yes, the exceptions are not a surprise. Why not test this on the actual hardware?

Thank you for the quick answer.
Im still trying to understand what would be the best board to start with because I havent any yet.

Ah! What to start with… the Panda2 is a good place to get your feet wet with NETMF. It has the best set of features for the price and there is a lot of code for all kinds of components in the code section here.

The Gadgeteer platform is great if you’re comfortable with software (i.e. have .NET development experience) but aren’t into soldering/hardware hacking. The Spider is the most mature board, meaning the most “plug and playable”, but that ease of use comes at a price. The new Cerberus is very affordable, but the SDK for it is not released yet. Even when released, it would require more extensive NETMF experience to really make it hum.

Thank you for the advices one more time. The Gadgeteer platform looks like something I can deal with and the Cerberus is the one I liked but as youve said Im not sure I can manage it with ease yet, so I have ordered one of these Panda II and just cant wait to get play with it. :slight_smile:

I started on Panda II, and it’s a fantastic board. In fact, I apparently got one of the really early ones right after they started shipping.

Now, I got a Cerb40 right after they started shipping. Here I am, right on the bleeding edge :slight_smile: