About Us Knowledge Base Community Forum Electronics Toolbox FAQ Shipping & Delivery

Community Forum

Share your projects and post your questions

Search
Register or Sign In
Forum

Assign an IO Pi Plus Pin to a Variable

31 Views - Created 27 days ago

27 days ago

Posted by:
Computerman142

Users Avatar

Hi

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.

Thanks

Rhys

27 days ago

Posted by:
andrew

Users Avatar

Location:
United Kingdom

Users Twitter  Users 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 into a future update.

AB Electronics UK Tech Support

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.