Raspberry Pi Pico -...
 
Notifications
Clear all

Raspberry Pi Pico - Control the (I/O) World  

Page 3 / 3

Underwood 41
(@underwood-41)
New Member
Joined: 2 weeks ago
Posts: 3
 
Posted by: @jfabernathy
Posted by: @jfabernathy
Posted by: @larrytubbs

I’ve used GPIO 15 on the Pi Pico without issue. I don’t see anything in the data sheet about it being special. The extra GPIO that I know of is the onboard LED. It has no paired external PIN. I believe it is GPIO 25. This looks like a typo to me. Given the pins start counting at zero, they must be referring to this pin, it is the 26th.

I put a question in the Adafruit forum.  We'll see what I get back.

 

It appears that the pin issue is related to beta releases of CircuitPython.  For details see: 

https://learn.adafruit.com/getting-started-with-raspberry-pi-pico-circuitpython/faq-and-troubleshooting#should-i-use-pin-gp15-3082470-3

Many thanks for solving this!

Kindest Regards, 

Willie 


ReplyQuote
DEC
 DEC
(@dec)
New Member
Joined: 2 weeks ago
Posts: 2
 

Bill,

Thanks for yet another excellent educational video.

Using Micropython is there any way to increase the text size on the OLED display?

Thanks,

Dec


ReplyQuote
jfabernathy
(@jfabernathy)
Estimable Member
Joined: 2 months ago
Posts: 130
 

For those of you that wonder about the differences between using CircuitPython vs. MicroPython, it comes down to using the libraries. The names of the libraries can be different and the way they handle passing values. MP seems to use a lot of functions while CP use Class attributes.  As an example I converted one of Bill's sketches from MP to CP. It's different; almost every line was touched.  That's why once you've spent time with CP, it's hard to use MP.  I use a lot of Adafruit Stemma QT breakout boards for sensors, displays, etc.  So I use their libraries which mean MP might not use the same library or call syntax. 

The big advantage for me is the same CP program I write for the Pico using I2C sensors will work unchanged on the Raspberry Pi 4 using the Adafruit Blinka library which is compatible with the CP library.

If your code won't compile, have another glass of bourbon. Eventual the problem will be solved.


ReplyQuote
byron
(@byron)
Reputable Member
Joined: 2 years ago
Posts: 451
 
Posted by: @jfabernathy

For those of you that wonder about the differences between using CircuitPython vs. MicroPython

you make a very good point about blinka.

For me CircuitPython has probably gone a bit overboard in making life simple for the user, and as you say in a previous post, their libraries are quite large chunks of code, not alway the simplest to read and one seemly simple library calls yet another library that imports yet another..... Quite a chain of libraries in fact.

But nevertheless I do use the Adafruit libraries and choose to run CircuitPython sometimes.  I have used blinka on my rpi on occasions. It works well. This is a topic that I'm sure @dronebot-workshop will eventually bring forth in his articles to come.

However, I have also found the MicroPython machine.i2c is quite similar to the SMBus rpi library for minimal code changes from microprocessor to rpi. when using i2c and much bloat can be saved. Also CircuitPython cannot handle interrupts, threading and no asyncio scheduler, at least at present.

One thing to be aware of is that each MicroPython port may be different. The 'original' MicroPython code is created for the pyboard, and I think that ports for the ESP8266, ESP32 and the rpi Pico and the BBC microbit are maintained by separate folks and can have differences in their provided libraries. But they all follow on from the code updated made to the pyboards' MicroPython updates and the core to all is still very much the same. For the boards that CircuitPython support, whilst the various board may have different bits of the base CircuitPython implemented, it endeavours to keep the bits that are implemented standard across the platforms it seems.


ReplyQuote
jfabernathy
(@jfabernathy)
Estimable Member
Joined: 2 months ago
Posts: 130
 

Anyway, I'm back to doing the demos from the video and when I got to the motor I only have a L293D which came in a box of parts kit with a little DC motor.  I've used that with the Raspberry Pi to run some demos.  Would that work okay with Bill's code? Maybe different wiring but I'm hoping I can just use what I have.

 

If your code won't compile, have another glass of bourbon. Eventual the problem will be solved.


ReplyQuote
jfabernathy
(@jfabernathy)
Estimable Member
Joined: 2 months ago
Posts: 130
 
Posted by: @jfabernathy

Anyway, I'm back to doing the demos from the video and when I got to the motor I only have a L293D which came in a box of parts kit with a little DC motor.  I've used that with the Raspberry Pi to run some demos.  Would that work okay with Bill's code? Maybe different wiring but I'm hoping I can just use what I have.

 

I compared my demo program for the L293D motor controller and it was basically the same as Bill's as far as PWMing the enable pins on the controller and setting the drivers to the opposite polarity.  So Bill's code worked without modification. 

In fact the only real change I made to any of the demos was the OLED program because my display was 128 x 64 instead of 128 x 32. 

So not that I have 4 or 5 programs on the Pico stored there. How do I delete them???

If your code won't compile, have another glass of bourbon. Eventual the problem will be solved.


ReplyQuote
Bart
 Bart
(@bart)
New Member
Joined: 2 weeks ago
Posts: 2
 

Did anyone try to replicate the example https://dronebotworkshop.com/pi-pico/#Adding_a_Display ?

I did, and got an error: ImportError: can't import name SSD1306_I2C . It seems to me that I did not install the correct library. I noticed, when I installed the library, that the installer said 'Package is not available at micropython.org. Version at PyPI will be installed.  Suggestions anyone?

Regards,

Bart


ReplyQuote
Page 3 / 3