I'm a newbie to IoT, and for my first project I'm struggling through a sample I found at https://www.richlynch.com/category/pi-garage-alert/.I have it all working well with the Raspbian OS that the author used. However, I'd really like to try this using Windows 10 IoT Core. I've had success with "Hello World" on the device using W10, but I can't seem to get the GPIO working. (I admit that I'm such a NOOB, even that statement may be incorrect - that's just what I've concluded from the source code and other reading.) I'm not sure if this is because I don't know how to translate the Python sample the author included, or if it needs to be done very differently in C#. It looks to me like I need to understand and translate the following commands, but that's about as far as I'm able to get: GPIO.setmode()GPIO.setup()GPIO.input()GPIO.cleanup() I've tried using the following, but have been unsuccessful: var gpio = GpioController.GetDefault(); var pin = gpio.OpenPin(pinNumber); pin.ValueChanged += Pin_ValueChanged; Everything appears to work, but "Pin_ValueChanged" never gets called. If I check the status of the pin using "pin.Read()", it never changes. I can't get the sensor to produce any meaningful change. Ideas? Any help would be much appreciated! Thanks! Brad.
Dear friend, If you use GPIO as Output, I suggest you refer to this sample on MSDN: https://developer.microsoft.com/en-us/windows/iot/samples/helloblinky If you use GPIO as Input, I suggest you refer to this sample on MSDN: https://developer.microsoft.com/en-us/windows/iot/samples/pushbutton You can set a breakpoint in "Pin_ValueChanged" event. If the Code can't get to the breakpoint you set when you push the button, just to make sure the Init function of Button Pin is OK.Keep Fighting
Yeah, I tried the code from that sample - it didn't help. Brad.
Dear friend, Did you try to set a breakpoint in "Pin_ValueChanged" event? "If the Code can't get to the breakpoint when you push the button, just to make sure the Init function of Button Pin is OK." For example, check the GPIO you connect is right.Keep Fighting
Hi Pletzky, There are a number of IoT Core samples for a Garage door. Rather than starting with a Raspian sample, have you looked at some of the Hackster I/O projects like this one? https://www.hackster.io/mlinnen/garage-door-powered-by-win-10-and-raspberry-pi-b2ed94 Sincerely, IoTGirl
Error building Windows 10 IOT FFU image from cab files
How does Arduino Wiring call UWP APIs? Or rather, CAN it?
IoT Core support for multiple Bluetooth Low Energy dongles
Windows Universal App Oracle Database Connection
How to display a clock on multiple pages in Windows core IOT app
Windows IoT Scheduled Task not running
Custom IoT Image Crashes On Boot
Remote Desktop\Thin Client
Win 10 IoT Remote update multiple devices
Node.js Express 4 App not running on Raspberry pi 15063
windows iot remote display security
The accuracy of measuring a plus width by using GPIO event and stopwatch
Installing application on Windows IoT
RPi Serial Port Start Bit