Maker Pi RP2040 Available GP Pins

Autonomous Robot, Manual Robot, DC Motor Driver, Stepper Motor Driver, Servo, Multi PWM chip.....

Maker Pi RP2040 Available GP Pins

Postby wmatchett » Tue Jul 12, 2022 2:39 am

I am trying to maximize GP pin usage. Pins 1,3,5,17,26,27, and 28 work fine. But when I attempt to initialize the GPIO paired pins of these (0,2,4,6,7,16,26) with this code:
CODE: SELECT_ALL_CODE
tp1 = digitalio.DigitalInOut(board.GP0)

I get the error:
CODE: SELECT_ALL_CODE
ValueError: GP0 in use

Can these pins be used and how are they initialized?
wmatchett
Greenhorn
 
Posts: 2
Joined: Tue Jul 12, 2022 2:31 am

Re: Maker Pi RP2040 Available GP Pins

Postby waiweng83 » Wed Jul 13, 2022 6:18 pm

Have you try out the code here?
https://github.com/CytronTechnologies/M ... de/code.py

It does utilize all the GPIO pins without any problem.
With the power of dream, nothing is impossible...
User avatar
waiweng83
Moderator
 
Posts: 205
Joined: Wed Apr 15, 2009 2:17 pm

Re: Maker Pi RP2040 Available GP Pins

Postby wmatchett » Tue Jul 19, 2022 3:05 am

waiweng83 WROTE:Have you try out the code here?
https://github.com/CytronTechnologies/M ... de/code.py

It does utilize all the GPIO pins without any problem.


Yes, inj fact this was the problem. I used this sample as a baseline to start testing and forgot about the LED pins. I had commented out the last pin of all the GPIO ports several days before and forgot about doing it. When I went back to use the other pin I did not remove from the LED usage and they were already in use. I commented out pin0 and it works fine.

Thanks for the help.
wmatchett
Greenhorn
 
Posts: 2
Joined: Tue Jul 12, 2022 2:31 am


Return to Robot Controller

Who is online

Users browsing this forum: No registered users and 17 guests

cron