This is a bug fix for HG on the RPi. Although the GPIO worked in HG already for RPi1 with early versions, it required some work by Wibo primarily to figure out what needed to be fixed to make the RPi2 work. At some point during Jessie’s development the OS changed the way the CPU was reported which broke GPIO in HG. Although this was the case for some time, it appears that there were no reports of this issue on github that prompted a fix. In June, Gene added some code to make the RPi4 work but stopped short of making all versions of the RPi work with HG.
I have submitted a pull request on Gene’s version of Raspberry-Sharp-System which fixes the GPIO issue. If Gene updates this code and incorporates it into the HG base code, this post will not be needed. However, due to the regularity of Gene’s updates, it may be some time before it’s incorporated. The attached library can be used with any version of HG on any RPi. However, I have found that RPi1 variants do not work with any of the recent releases of HG so keep that in mind.
You should only need the Raspberry.System.dll but some versions of HG also have the xml and pdb files included so it probably doesn’t hurt to replace them as well. I also included the Test.Board.exe file that will output what info your RPi is sending to HG if something goes wrong.
Raspberry.System.update.zip (13.9 KB)