Hi everyone, I'm new to Windows IoT Core on the Raspberry Pi 4 and I'm trying to control an LED using the GPIO pins. I've followed the official tutorial but the LED never lights up. Can anyone point out any common pitfalls?
Getting Started with GPIO on Raspberry Pi 4 (Windows IoT Core)
Jan 12, 2024 at 09:15 AM
Jan 12, 2024 at 10:02 AM
Make sure you have enabled the correct pin in the DevicePortal. Also, double check that you are using the right pin number (BCM vs physical).
Jan 12, 2024 at 11:20 AM
Thanks, I realized I was using the physical pin number. Switching to BCM 17 fixed it! Also, adding a try/catch around the GpioPin creation helped catch permission errors.
Jan 13, 2024 at 08:45 AM
Another tip: use the GpioPinValueChanged event to debounce button inputs. It works well with the GpioPinDriveMode.InputPullUp mode.
Jan 13, 2024 at 09:30 AM
Great! I added button handling with debounce and now I have a working blink-and-button demo. Thanks everyone!