# GPIO Example App

**URL:** <https://forums.digi.com/t/gpio-example-app/38288>\
**Category:** Linux\
**Created:** [March 20, 2026, 3:57pm UTC](https://forums.digi.com/t/gpio-example-app/38288 "2026-03-20T15:57:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SteveT](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@SteveT](https://forums.digi.com/u/SteveT)\
**Post date:** [March 20, 2026, 3:57pm UTC](https://forums.digi.com/t/gpio-example-app/38288/1 "2026-03-20T15:57:33Z")

</div>

I’m using the CC MP13 dev board and running Digi’s example app GPIO EXAMPLE on it. It looks like the app is looking for two command line arguments, a button controller and an led controller. How do I determine what those values should be?

---

<div class="post-metadata">

**Author:** ![SteveT](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@SteveT](https://forums.digi.com/u/SteveT)\
**Post date:** [March 23, 2026, 3:06pm UTC](https://forums.digi.com/t/gpio-example-app/38288/2 "2026-03-23T15:06:36Z")

</div>

I figured out that, If only one command line argument is supplied, and it doesn’t matter what the argument value is, then default values are used to get the button controller and the led controller.

ldx\_gpio\_get\_controller(DEFAULT\_USER\_BUTTON\_ALIAS, button\_ctrl);  
button\_line = ldx\_gpio\_get\_line(DEFAULT\_USER\_BUTTON\_ALIAS);  
ldx\_gpio\_get\_controller(DEFAULT\_USER\_LED\_ALIAS, led\_ctrl);  
led\_line = ldx\_gpio\_get\_line(DEFAULT\_USER\_LED\_ALIAS);

But when the button control parameters are used, they fail:

gpio\_input = ldx\_gpio\_request\_by\_controller(button\_ctrl, button\_line, GPIO\_IRQ\_EDGE\_RISING);  
if (!gpio\_input)  
printf(“Failed to initialize input gpio”);
