Joystick and V4.3.8.1

Should the interrupt below still work? I am attempting to upgrade an existing project.

        public JoystickClass()
            inputX = new AnalogInput((Cpu.AnalogChannel)10);
            inputY = new AnalogInput((Cpu.AnalogChannel)11);
            input = new InterruptPort((Cpu.Pin)GHI.Pins.G400S.AnalogInput.PB8, true, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeBoth);
            // add an interrupt handler to the pin
            input.OnInterrupt += input_OnInterrupt;
            this.offsetX = 0;
            this.offsetY = 0;

My project has been running for a year without fault. I changed to Windows 10 and reinstalled everything. I also applied V4.3.8.1 bootloader and firmware (was V4.3.7.10). Only two code changes were required both with regard to GHI.Pins.G400 and the V4.3.8.1 change to G400D and G400S. In the above code item the GHI.Pins.G400S.AnalogInput.PB8 was previously GHI.Pins.G400.PB8. The current schema for the Joystick shows socket A pin 3 as Button. I am using a Raptor socket 18 APY pin 3.

Can I use pin 3 socket 18 as an interrupt pin?

What do the error messages in the attached image mean?

Many thanks,

how did you “upgrade” your project? If you installed a different SDK then you need to “clean” your project. Depending on the complexity, it might be easiest to start a new project of the correct version, and then copy over your code - or the other way is to remove all the references in the project and then re-add them.

Hi Brett,
At first I used the old project but removed the old references that referred to V4.3.7.10 and replaced them with references to V4.3.8.1. Probably involved only two GHI.Pins and GHI.Hardware. This introduced the error messages regarding G400 pins and the error messages regarding other class projects.
Next I started with a new project and copied source code from the old project into the new project. I achieved no improvement by building a complete new project.

ps Is it true that the Raptor can only use pin 3 on X & Y sockets as interrupt pins?

Looking at a basic test of my system: What are these errors like 0x80131700 (please see image)

It probably means that you have just installed on a system that does not have .net 2.0/3.5 installed. The full issue is described here : [url][/url]. Downloading and placing the file provided there into the correct location on your system will fix the issue.

  1. in solution Explorer expand ‘References’, the error is probably here.
  2. Show also the Project properties
    • tab Application
    • tab .Net Micro Framework
      You may also perform some search on the forum for “MMP”, you may learn a lot.

@ mcalsyn - Thank you! I installed Microsoft .NET Framework 3.5 Service Pack 1 [url][/url] This fixed the MMP problem 100%.


@ KG1 -

If you have never tried to compile any NETMF or Gadgeteer programs in a newly installed programming environment (all SDKs just installed), and you receive the error: MMP : error MMP0000: 0x80131700 then there is a known work-around. This is do to a dependence of NETMF on a file called “MetaDataProcessor.exe.config” which, in turn, is dependent on the version of “.NET” (not NETMF) installed on the system or because .NET is not installed on the computer.

This bug and the workaround (copied below) are described in the NETMF issue 221

The fix: go to the link NETMF issue 221, download the file MetaDataProcessor.exe.config then copy the file into a directory where the .exe file is located at “ProgramFiles (x86)\Microsoft .NET Micro Framework\vX.X\Tools”, where X.X is the version of NETMF you are using (for example “v4.2”). Alternatively install “.NET Framework 2.0+ (3.5 SP1)”. In Windows 8.1 you do this by adding the .NET 3.5 windows feature which is an option in the control panel