SUMMER SALE • UP TO 20% OFF • Ends 31st AUGUST 2025 *excludes trade customers
Support Forum

Share your projects and post your questions

The Forum

Assign an IO Pi Plus Pin to a Variable

The IO Pi Plus is a 32 channel MCP23017 GPIO expander for the Raspberry Pi

16/11/2019

Posted by:
Computerman142

Computerman142 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

17/11/2019

Posted by:
andrew

andrew Avatar

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.

Forum Notice – Closure to New Posts

As part of our compliance with the UK’s Online Safety Act, the AB Electronics UK support forum is now closed to new posts and replies.

We understand the importance of continued support for our products, so if you have a technical query or require assistance, please use the Contact Form or consult our Knowledge Base for helpful articles and documentation.

We appreciate your understanding and continued 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.

Home

Shop

Learn

Forum

FAQ

Contact

0 item

Your cart is empty

Please browse our shop to order from the wide range of Raspberry Pi boards and accessories.

Subtotal:£0.00
View Basket Continue to Checkout