Windows IoT


Door Ajar/Raspberry/GPIO/Python/C#


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

Related Links

Windows 10 IoT UWP JavaScript no WebRTC
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
BTLE Development
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

Categories

MSDN
Apps for Office and Sh...
Visual Studio Team Fou...
HealthVault
Microsoft Robotics
Smart Device Development
Windows Server
Samsung PC
Microsoft Atlas API: D...
Exchange Server
Lync Server
Archived Forums SA-SM
Archived Forums T-U
Open source Developmen...
Visual Studio Integrate
Visual Studio Editor
Windows Desktop Develo...
Windows Desktop Debugging
Windows Desktop Search...
Windows Hardware WDK a...
Developing Apps for Of...
SharePoint 2010 - Gene...
SharePoint 2010 - Deve...
SharePoint 2010 - Setu...
SharePoint Legacy Vers...
Cloud Services (Web an...
Azure Storage
Azure Mobile Apps
Azure Automation
Azure Marketplace
Azure API Management
Azure App Service - AP...
Azure Logic Apps
Azure SQL Data Warehouse
Azure Analysis Services
Azure Database for Pos...
Publishing Apps for th...
.NET Framework Class L...
Windows Presentation F...
Architecture General
Code Contracts
Microsoft Translator H...
ISV Open Discussions
SyncFx - General [Read...
SyncFx - SyncToy-File ...
Microsoft Robotics - D...
.NET Compact Framework
Windows Mobile Develop...
SQL Server Data Access
SQL Server Notificatio...
SQL Server Search
SQL Server Data Tools
SQL Server In-Memory T...
Standard 2009: Compone...
Standard 2009: Misc
Standard 7: Tools
Orchard - Help and Sup...
WebsitePanel - Support
WebsitePanel - Enterpr...
The Samsung Windows De...
Office Live Basics, Es...
Windows Protocols
SQL Server Protocols
Exchange Server Develo...
Silverlight 4
Silverlight Controls a...
Expression Studio with...
Search Server: Install...
Retired SharePoint Exc...
.NET Framework 4 setup...
Acropolis
Architecture Events
App Producer (archived)
Crystal Reports for Vi...
Deep Zoom Composer
Game Technologies: Gen...
Moderator Posting Only...
MS-Build, Multi-Target...
Office Development wit...
Performance Counters f...
Phoenix
Parallel Programming w...
Storage Platform – ATA
SyncFx - Feedback [Rea...
SQL Server in Azure VMs
SQL Server 2014 SQL To...
Team Foundation Server...
Team Foundation Server...
Team Foundation Server...
TFS Deployment to Azure
UI Design for Windows ...
Visual Basic 2008 (Pre...
Visual C# Express 2008...
Visual Studio Code Ana...
Visual Studio Database...
Visual Studio Editor i...
Web Sandbox - Exploits
Windows Live Alerts De...
Building Windows Store...
Building Windows Store...
XNA Game Studio Express
OneDrive Development (...
Azure N-Series Virtual...
Microsoft Graph

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile