Getting Started with GPIO on Raspberry Pi 4 (Windows IoT Core)

Started by on Jan 12, 2024 • 5 replies

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?

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).

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.

Another tip: use the GpioPinValueChanged event to debounce button inputs. It works well with the GpioPinDriveMode.InputPullUp mode.

Great! I added button handling with debounce and now I have a working blink-and-button demo. Thanks everyone!

Post a Reply