Is it possible ot use digital inputs 16 and 26 on the FezHat with interrupts? I do not see anything on the FezHat that allows for it, but if I try to connect to those pins directly after creating the FezHat I get pin is opened in an incompatible sharing mode. I’ve even tried executing a read from the pin through the FezHat first. The failing line is Gpio16.
FezHat = await FEZHAT.CreateAsync();
FezHat.ReadDigital(FEZHAT.DigitalPin.DIO16);
FezHat.ReadDigital(FEZHAT.DigitalPin.DIO26);
GpioController = GpioController.GetDefault();
Gpio16 = GpioController.OpenPin(16, GpioSharingMode.SharedReadOnly);
Gpio26 = GpioController.OpenPin(26, GpioSharingMode.SharedReadOnly);
@ PintSize.Me - The FEZ HAT driver reserves all IOs in exclusive mode and does not currently expose interrupts. The only option is to stop using the FEZ HAT driver or modify the source yourself instead of using the Nuget package: https://bitbucket.org/ghi_elect/windows-iot/src/446f393eff4a92ebd27eddae96c9a02c2476d18b/GHIElectronics.UWP.Shields.FEZHAT/FEZHAT.cs?at=master&fileviewer=file-view-default
@ John - Thanks, I copied the FEZHAT class into my project, ripped everything out related to those two pins, and it looks to be working. Needed those two pins for interrupts from the MCP23017’s I’m connecting, but I still wanted the lights, temp, and analog inputs.
1 Like
@ PintSize.Me - Glad to hear you got it working.