# GPIO problem on Nano

**URL:** <https://forums.developer.nvidia.com/t/gpio-problem-on-nano/74467>\
**Category:** Jetson Nano\
**Created:** [May 9, 2019, 6:26pm UTC](https://forums.developer.nvidia.com/t/gpio-problem-on-nano/74467 "2019-05-09T18:26:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kylezheng04](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/kylezheng04/32/16171_2.png) [@kylezheng04](https://forums.developer.nvidia.com/u/kylezheng04)\
**Post date:** [May 9, 2019, 6:26pm UTC](https://forums.developer.nvidia.com/t/gpio-problem-on-nano/74467/1 "2019-05-09T18:26:13Z")

</div>

Could you let me know how I could enable the GPIO port? For example, I connect a device with 3.3VDC on 17 pin, GND on 20 pin, and data on pin 19 (corresponding to GPIO 16), I put the input\_pin=16, but nothing happens. I always get 0 output. While I switch to input\_pin=19, it does not get better.

Code are located at /opt/nvidia/jetson-gpio/samples/simple\_input.py

---

<div class="post-metadata">

**Author:** ![kylezheng04](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/kylezheng04/32/16171_2.png) [@kylezheng04](https://forums.developer.nvidia.com/u/kylezheng04)\
**Post date:** [May 9, 2019, 6:26pm UTC](https://forums.developer.nvidia.com/t/gpio-problem-on-nano/74467/2 "2019-05-09T18:26:51Z")

</div>

I find out that the code located in line 88 of  
/usr/local/lib/python3.6/dist-packages/Jetson/GPIO/gpio.py is wrong and would throw out error when running simple\_input.py in /opt/nvidia/jetson-gpio/samples/simple\_input.py code. I changed it to:

if int(os.listdir(version\_path)[1][-3:]) \>= 200:

from

if int(os.listdir(version\_path)[0][-3:]) \>= 200:

Could you confirm this is a bug or something funny happens in the Nano device?

---

<div class="post-metadata">

**Author:** ![JerryChang](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jerrychang/32/14043_2.png) [@JerryChang](https://forums.developer.nvidia.com/u/JerryChang)\
**Post date:** [May 10, 2019, 3:35am UTC](https://forums.developer.nvidia.com/t/gpio-problem-on-nano/74467/3 "2019-05-10T03:35:49Z")

</div>

hello kylezheng04,

I’ve check Nano’s default root filesystem, which looks correct.

```auto
if int(os.listdir(version_path)[0][-3:]) >= 200:

```

am not sure what’s wrong according to your [comment #2](https://devtalk.nvidia.com/default/topic/1051608/jetson-nano/gpio-problem-on-nano/post/5337564/#5337564), could you please download the package again to have double confirmation.  
thanks

---

<div class="post-metadata">

**Author:** ![2310351762](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@2310351762](https://forums.developer.nvidia.com/u/2310351762)\
**Post date:** [May 15, 2019, 2:17pm UTC](https://forums.developer.nvidia.com/t/gpio-problem-on-nano/74467/4 "2019-05-15T14:17:15Z")

</div>

i have the same problem, have you solved it?

---

<div class="post-metadata">

**Author:** ![JerryChang](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jerrychang/32/14043_2.png) [@JerryChang](https://forums.developer.nvidia.com/u/JerryChang)\
**Post date:** [May 16, 2019, 2:15am UTC](https://forums.developer.nvidia.com/t/gpio-problem-on-nano/74467/5 "2019-05-16T02:15:11Z")

</div>

> [@](#):
>
> i have the same problem, have you solved it?

hello 2310351762,

did you had same issue as [comment #2](https://devtalk.nvidia.com/default/topic/1051608/jetson-nano/gpio-problem-on-nano/post/5337564/#5337564)?  
may I know the linkage of the package you had working with and found the version path failure.  
thanks

---

<div class="post-metadata">

**Author:** ![nadeemm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nadeemm/32/367020_2.png) [@nadeemm](https://forums.developer.nvidia.com/u/nadeemm)\
**Post date:** [October 18, 2021, 5:44pm UTC](https://forums.developer.nvidia.com/t/gpio-problem-on-nano/74467/6 "2021-10-18T17:44:10Z")

</div>

Closed on October 18, 2021, 5:44pm UTC


