- I have created a new .NET Gadgeteer Application (NETMF 4.2)
- I have dragged a GHIElectronics.RFID component from the toolbox onto the screen.
- The component is connected to the only available socket for this component, socket 5.
- When I start debugging this project it deploys and generates a System.ArgumentException with the following stack trace:
[External Code]
Gadgeteer.Serial.dll!Gadgeteer.Interfaces.Serial.Open() Line 426 + 0x22 bytes C#
GTM.GHIElectronics.RFID.dll!Gadgeteer.Modules.GHIElectronics.RFID.RFID(int socketNumber) Line 70 + 0x46 bytes C#
> GadgeteerApp2.exe!GadgeteerApp2.Program.InitializeModules() Line 35 + 0x5 bytes C#
GadgeteerApp2.exe!GadgeteerApp2.Program.Main() Line 27 + 0x18 bytes C#
The Program.Generated.cs looks as following:
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by the Gadgeteer Designer.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Gadgeteer;
using GTM = Gadgeteer.Modules;
namespace GadgeteerApp2
{
public partial class Program : Gadgeteer.Program
{
// GTM.Module definitions
Gadgeteer.Modules.GHIElectronics.RFID rfid;
public static void Main()
{
//Important to initialize the Mainboard first
Mainboard = new GHIElectronics.Gadgeteer.FEZCobra_II();
Program program = new Program();
program.InitializeModules();
program.ProgramStarted();
program.Run(); // Starts Dispatcher
}
private void InitializeModules()
{
// Initialize GTM.Modules and event handlers here.
rfid = new GTM.GHIElectronics.RFID(5);
}
}
}
Does anyone have an idea what I am doing wrong?