Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

Assign an IO Pi Plus Pin to a Variable

1177 Views - Created 16/11/2019


Posted by:

Computerman142 Avatar


I am using the IO Pi Plus, and would like to assign a pin to a variable in python like you can with gpiozero. So for example in gpiozero for the Raspbery Pi header GPIO pins, you would have for example "pedbutton2 = Button(5)". However I cant figure how to create a similar assignment with IO Pi Plus code, does the IO Pi Plus support this or similar? I have read the readme file but can only see the ability to specify bus.read_pin or write_pin, but doesnt look like it wouldn't work as assingment as they are actions. If the IO Pi Plus does support assigning a pin to a variable, how would I go about doing this? Any advice would much appreciated.




Posted by:

andrew Avatar

United Kingdom

andrew Twitter  andrew Website  

Hello Rhys

At the moment the IO Pi library does not support assigning a pin to a variable but I will look into adding that feature to a future update.

Sign in to post your reply

Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.