Join GitHub today
Always getting an exception GpioConnection: Object reference not set to an instance of an object #86
I have a Raspberry Pi 3 B. I did some GPIO development using Python, but I would love to use C#.
I keep getting the following error no matter if I compile on Visual Studio (on Windows) or MonoDevelop (on Raspberry Pi):
Thank you for any help.
Right, it works for me.
Next : In Raspberry.IO.GeneralPurpose, edit the function :
IT is magic !
referenced this issue
Jul 26, 2017
Also, I wonder if even older Pi's report Bcm2835 as the Hardware value in
However, if you know you're only running on a RPi 3, then @Bulinlinbu's change looks safe enough.
Finally, test on my RPi3 indicates that this quick and dirty workaround also works, if you know you are running on a RPi 3:
I wouldn't advocate using that for any long-term purpose, but as a quick workaround until R#.IO, for users who know they are on RPi3, it seems to work. It amounts to forcing in the value that the library expects to see on an RPi 2 - which results in the correct GPIO memory addresses being selected because the addresses are the same on the Pi 3.