# Using IO Library with Processing.py

**URL:** <https://discourse.processing.org/t/using-io-library-with-processing-py/26956>\
**Category:** Processing.py\
**Created:** [January 10, 2021, 9:22pm UTC](https://discourse.processing.org/t/using-io-library-with-processing-py/26956 "2021-01-10T21:22:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![witlogic](https://avatars.discourse-cdn.com/v4/letter/w/ac8455/32.png) [@witlogic](https://discourse.processing.org/u/witlogic)\
**Post date:** [January 10, 2021, 9:22pm UTC](https://discourse.processing.org/t/using-io-library-with-processing-py/26956/1 "2021-01-10T21:22:51Z")

</div>

I’m trying to use Processing.py to read GPIO pins on a Raspberry Pi.  
I haven’t been able to find any examples of IO library for Processing.py.  
I’ve added the IO library, but can’t figure out right syntax to access the GPIO functions.  
I’m getting this error.  
NameError: global name ‘GPIO’ is not defined  
Does anyone have experience using this library with Processing.py?

```auto
add_library('io')

def setup():
     GPIO.pinMode(4, GPIO.INPUT_PULLUP)

```

---

<div class="post-metadata">

**Author:** ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)\
**Post date:** [January 10, 2021, 10:18pm UTC](https://discourse.processing.org/t/using-io-library-with-processing-py/26956/2 "2021-01-10T22:18:57Z")

</div>

I think you should open an issue at [GitHub - jdf/Processing.py-Bugs: A home for all bugs and feature requests about Python Mode for the Processing Development Environment.](https://github.com/jdf/Processing.py-Bugs) asking JDF to add support to this library. There are some libraries that need under the hood effort to work with Python mode ☹

---

<div class="post-metadata">

**Author:** ![witlogic](https://avatars.discourse-cdn.com/v4/letter/w/ac8455/32.png) [@witlogic](https://discourse.processing.org/u/witlogic)\
**Post date:** [January 10, 2021, 10:29pm UTC](https://discourse.processing.org/t/using-io-library-with-processing-py/26956/3 "2021-01-10T22:29:29Z")

</div>

Thanks, I’ll do that.

---

<div class="post-metadata">

**Author:** ![witlogic](https://avatars.discourse-cdn.com/v4/letter/w/ac8455/32.png) [@witlogic](https://discourse.processing.org/u/witlogic)\
**Post date:** [January 10, 2021, 10:34pm UTC](https://discourse.processing.org/t/using-io-library-with-processing-py/26956/4 "2021-01-10T22:34:31Z")

</div>

Looks like this issue has been previously addressed, but I need to use a imaged version of Raspberrian rather than installing Processing on my own.

[GPIO Library does not load at raspberry pi 3 · Issue #189 · jdf/Processing.py-Bugs · GitHub](https://github.com/jdf/Processing.py-Bugs/issues/189)
