I'm trying to implement one of my Python codes in .NET.
I'm using a bit different hardware setup. I use a 4 pin tacticle button (http://www.hqelektronika.hu/newpic/2/10 ... 1798HQ.jpg), I connect button pin 1 to ground and button pin 3 to RPi2 GPIO22 pin. This setup was working very well under Raspbian, with the following python code:
Code: Select all
GPIO.setmode(GPIO.BOARD) ## Use board pin numbering
GPIO.setup(13, GPIO.IN, pull_up_down=GPIO.PUD_UP)
Code: Select all
pushButton = gpio.OpenPin(PB_PIN);
pushButton.SetDriveMode(GpioPinDriveMode.InputPullUp);
Code: Select all
An exception of type 'System.ArgumentException' occurred in <exename> but was not handled in user code
WinRT information: value': Invalid argument
Additional information: The parameter is incorrect.