Skip to content

Releases: pimoroni/pimoroni-pico

Version 1.24.0 - Beta 1

31 Oct 16:57
Compare
Choose a tag to compare
Pre-release

This release is based upon MicroPython 1.24.0 which introduces, among other things, support for the RP2350 chip found in the Pico 2 and our own boards. Since RP2350 is new, and we've been busy working on various new features and bugfixes to accompany it, this release should be considered beta.

⚠️ None of the builds in this release include RP2350 support- things are still a little experimental in that department. If you've got a shiny new RP2350 board you should go here: https://github.com/pimoroni/pimoroni-pico-rp2350/releases/latest

Doing A Thing With PPP

You'll notice a new "ppp" build, this includes MicroPython's new PPP support, leveraging UART to talk to networking modules like our Clipper LTE Breakout. We need a standalone build for this because PPP and networking support are bulky, requiring a 1MB/1MB filesystem split.

See https://github.com/pimoroni/pimoroni-pico-rp2350/blob/main/micropython/examples/pico_plus_2/breakouts/lte-catfacts.py for an example of how to get the LTE module up and running with Pico!

⚠️ Flashing the "ppp" build to an existing Pico board will erase your filesystem. Back up first!

PicoVector Changes Again

We've completely overhauled PicoVector more or less from the ground up, this includes changes to drawing operations, font formats and a whole bunch of plumbing changes which render it quite incompatible with old PicoVector code. If you've got some existing code you want to port over, chime in on #1026

PicoGraphics Layers

We've introduced the concept of layers into PicoGraphics. This is a fairly memory intensive feature that lets you create a PicoGraphics instance with multiple drawing layers. It doesn't have much practical use on RP2040 builds - ie: most of the boards supported here - but can be very useful on the RP2350. Documentation and examples are scarce while we work out how it fits into the bigger picture.

Non-blocking Inky Frame

Inky Frame has gained a non-blocking mode, so you can put that 20-second refresh time to better use. Find out more at #936

What's Changed

New Contributors

Full Changelog: v1.23.0-1...v1.24.0-rc0
MicroPython Changelog: micropython/micropython@v1.23.0...v1.24.0

Version 1.23.0 - Bugfix 1

06 Jun 18:16
7a2ebe5
Compare
Choose a tag to compare

This release is basically v1.23.0, except that it's actually based upon MicroPython v1.23.0, plus a small fix to make our builds work.

If you're seeing hangs when you try to time.sleep() or use led = Pin("LED", Pin.OUT) or wireless functionality, then this is the release for you 🥳

Doing A Thing With USB

This release is based on MicroPython v1.23.0 (well, actually, just slightly past v1.23.0), which introduces USB support. We have not rolled this out to all of our builds because:

  1. It's new and complicated
  2. So we're still figuring it out...
  3. It's also big, and we're forever running out of firmware space
  4. And in many cases there's no good reason for USB... at least yet!

In lieu of this, you'll find a new build in this release: pico_usb. This build gives you a way to play with USB on the Pico (non W for now) in conjunction with our libraries. To demo this we've added some basic code for long-time holdout Keybow 2040, which can now do keyboards things with MicroPython. You can find those here: https://github.com/pimoroni/pimoroni-pico/tree/main/micropython/examples/keybow2040

⚠️ the pico_usb build uses a 1MB/1MB Flash/Filesystem split so it will erase your .py files. Back up before flashing!

What's Changed

To get an idea of what's new and what's improved, you should first read the MicroPython release notes: https://github.com/micropython/micropython/releases/tag/v1.23.0

Over here in Pimoroni Pico MicroPython land we've been busy fixing bugs and adding features-

Renamed And Less Breaky Builds

More of a personal bugbear than anything else, but I renamed our .uf2 files to drop the "pimoroni-" from the front so it's easier to scan-read down the list. I've also added a verification step to make sure we don't inadvertently produce totally broken builds- which has happened in a release at least once - or subtly broken builds - which has wasted inordinate amounts of my time spent scratching my head. If you want a tool/library to poke at Pico's binary metadata gooey innards, see: https://github.com/gadgetoid/py_decl

Updated ulab

Since we needed compatibility with some breaking changes in MicroPython v1.23.0, a bunch of extra fixes have been swept up in the ulab module. Details of the latest release can be found here: https://github.com/v923z/micropython-ulab/releases/tag/6.5.2

PNG Decode

We've added support for greyscale PNG files, which are a great way to stamp out monochrome icons from very, very small source files.

This support includes the ability to shift a greyscale PNGs "colours" to anywhere within a PicoGraphics palette. It's a hard concept to explain, but you can get two completely different recolours of artwork out of the same greyscale PNG file- @thirdr has illustrated this with an example: https://github.com/pimoroni/pimoroni-pico/blob/main/micropython/examples/pico_display/display_png_offset_palette.py

You'll also find basic PNG examples for Inky Frame, Pico Display and Tufty 2040 - https://github.com/pimoroni/pimoroni-pico/pull/928/files

All The Things 🎉

And here's an exhaustive list of everything we've merged since v1.22.2-

Full Changelog: v1.23.0...v1.23.0-1
MicroPython Changelog: micropython/micropython@v1.22.2...v1.23.0

Note: also includes this commit: micropython/micropython@932f76c

New Contributors

Version 1.23.0

04 Jun 20:09
3440ab2
Compare
Choose a tag to compare

⚠️ Whoa There! ⚠️

I pulled in a few too many spicy, unstable post-1.23.0 commits and as a result, this release is broken. So very broken.

Please see: https://github.com/pimoroni/pimoroni-pico/releases/tag/v1.23.0-1

Doing A Thing With USB

This release is based on MicroPython v1.23.0 (well, actually, just slightly past v1.23.0), which introduces USB support. We have not rolled this out to all of our builds because:

  1. It's new and complicated
  2. So we're still figuring it out...
  3. It's also big, and we're forever running out of firmware space
  4. And in many cases there's no good reason for USB... at least yet!

In lieu of this, you'll find a new build in this release: pico_usb. This build gives you a way to play with USB on the Pico (non W for now) in conjunction with our libraries. To demo this we've added some basic code for long-time holdout Keybow 2040, which can now do keyboards things with MicroPython. You can find those here: https://github.com/pimoroni/pimoroni-pico/tree/main/micropython/examples/keybow2040

What's Changed

To get an idea of what's new and what's improved, you should first read the MicroPython release notes: https://github.com/micropython/micropython/releases/tag/v1.23.0

Over here in Pimoroni Pico MicroPython land we've been busy fixing bugs and adding features-

Renamed And Less Breaky Builds

More of a personal bugbear than anything else, but I renamed our .uf2 files to drop the "pimoroni-" from the front so it's easier to scan-read down the list. I've also added a verification step to make sure we don't inadvertently produce totally broken builds- which has happened in a release at least once - or subtly broken builds - which has wasted inordinate amounts of my time spent scratching my head. If you want a tool/library to poke at Pico's binary metadata gooey innards, see: https://github.com/gadgetoid/py_decl

Updated ulab

Since we needed compatibility with some breaking changes in MicroPython v1.23.0, a bunch of extra fixes have been swept up in the ulab module. Details of the latest release can be found here: https://github.com/v923z/micropython-ulab/releases/tag/6.5.2

PNG Decode

We've added support for greyscale PNG files, which are a great way to stamp out monochrome icons from very, very small source files.

This support includes the ability to shift a greyscale PNGs "colours" to anywhere within a PicoGraphics palette. It's a hard concept to explain, but you can get two completely different recolours of artwork out of the same greyscale PNG file- @thirdr has illustrated this with an example: https://github.com/pimoroni/pimoroni-pico/blob/main/micropython/examples/pico_display/display_png_offset_palette.py

You'll also find basic PNG examples for Inky Frame, Pico Display and Tufty 2040 - https://github.com/pimoroni/pimoroni-pico/pull/928/files

All The Things 🎉

And here's an exhaustive list of everything we've merged since v1.22.2-

Full Changelog: v1.22.2...v1.23.0
MicroPython Changelog: micropython/micropython@v1.22.2...932f76c

New Contributors

Version 1.22.2

06 Mar 10:37
6eb0f90
Compare
Choose a tag to compare
Version 1.22.2 Pre-release
Pre-release

Better... Later Than Neverer?

Hot on the tail of MicroPython v1.22.1 there was a patch release which included some changes to DMA interrupt handler behavior which we had to be a little cautious about embracing. It turns out that these did, in fact, expose some problems in the Hub75/Interstate75 driver which I have - hopefully - fixed. This release is mostly to track MicroPython v1.22.2, but includes a few downstream changes too.

⚠️ WARNING: Like v1.21.1, this build changes the LittleFS filesystem version and will update your board filesystem automatically. Please back up your Python files before updating! You will not be able to revert to a build older than v1.21.1 without trashing your filesystem. ⚠️

For a complete list of MicroPython changes since v1.21.1, see micropython/micropython@v1.22.1...v1.22.2

This release also includes some fixes to PNGDEC (The PNG image decoder) to make it compatible with Badger 2040 / Inky Pack. This is useful, since PNG is a much, much better format for precisely plotting pixels on a 1-bit display.

Finally JPEGDEC gets a working width and height method which are usable after you open a file or stream, so you can determine the size of a JPEG before drawing it.

ULAB

ulab - the lite, MicroPython version of numpy - can be found in the Cosmic Unicorn, Galactic Unicorn, Stellar Unicorn, Tufty 2040, Pico LiPo 4MB and Pico LiPo 16MB builds.

What's Changed

Full Changelog: v1.22.1...v1.22.2

Version 1.22.1

22 Feb 11:31
8ca47d6
Compare
Choose a tag to compare
Version 1.22.1 Pre-release
Pre-release

Better Late Than Never

This release is - mostly - to track the latest v1.22.0 release of MicroPython and the v1.22.1 patch release, so you can start enjoying the fixes/changes.

For a complete list of MicroPython changes since v1.21.0, see micropython/micropython@v1.21.0...v1.22.1

⚠️ WARNING: This build changes the LittleFS filesystem version and will update your board filesystem automatically. Please back up your Python files before updating! You will not be able to revert to an older build without trashing your filesystem. ⚠️

Possible known issues:

What's Changed

New Contributors

Full Changelog: v1.21.0...v1.22.1

Version 1.21.0

06 Oct 16:57
ee7f275
Compare
Choose a tag to compare

MicroPython Made Me Do It

This release is - mostly - to track the latest v1.21.0 release of MicroPython, so you can start enjoying the fixes/changes

For a complete list of MicroPython changes since v1.20.6, see micropython/micropython@856e08b...v1.21.0

⚠️ MicroPython v1.21.0 removes the "u" prefix from a number of modules, and we'll be updating our examples to match in good time. This may break backwards compatibility with older builds, so we'll give v1.21.x versions a little time to bed in first.

We have a couple of downstream fixes, too:

  • JPEGDEC: If you supply bytes to jpeg.open_RAM it will now work as you might expect
  • sdcard: We've dropped our compiled sdcard.mpy in favour of including the micropython-lib sdcard.py

What's Changed

Full Changelog: v1.20.6...v1.21.0

v1.20.6

18 Sep 11:02
8eac60a
Compare
Choose a tag to compare

(Slightly More) Glorious Vector Visuals

This release is mostly bugfixes for v1.20.5s vector graphics release.

There's also a bitmap font fix, making a space - in fixed_width mode - count as a fixed-width character, rather than the font's preconfigured space width.

What's Changed

Full Changelog: v1.20.5...v1.20.6

Version 1.20.5

06 Sep 14:41
a334899
Compare
Choose a tag to compare

Glorious Vector Visuals

This release introduces a beta of PicoVector, a library that sits atop PicoGraphics and supplies anti-aliased vector drawing tools using Pretty Poly.

PicoVector is currently available in the following builds:

  • Pico
  • Pico W
  • Pico LiPo
  • Tufty 2040

It includes support for Alright Fonts, allowing you to convert almost any ttf or otf font into a simplified vector format - a sequence of overlapping polygonal contours - which you can use in your PicoGraphics projects.

And, we really mean almost any font -
image

Currently PicoVector is not fast. Turning off anti-aliasing gets you a little more performance, but it's generally only useful in very limited quantities.

What's Changed

New Contributors

Full Changelog: v1.20.4...v1.20.5

Version 1.20.4

04 Aug 15:56
d93839d
Compare
Choose a tag to compare

Spin Me Right 'Round

Text bugs & rotation

In our continued quest to make doin'-text-stuff better, this version fixes a couple of text rendering bugs. The code wasn't taking into account letter spacing when calculating the width of words, resulting in auto word-wrap failing to wrap words that didn't fit. Additionally it was ignoring line breaks (\n) so that manually wrapped text was rendered as one line. Both of these bugs should now bug fixed, and -

You can now rotate Bitmap text in 90 degree intervals. Just provide an angle argument when drawing text. Text is always drawn with the origin at the top-left, so a 180 degree rotation for text shown at 0, 0 will disappear the text off the left-edge of the screen. You'll need to offset your text accordingly to avoid this.

text rgb

PNG support

Hands up, JPEG was an odd choice of format to start with for embedded graphics. It was grabbing JPEG files over the network and display them on e-ink displays that drove us towards it. Using it for icons in Badger/Badger 2040 was not a great fit- we had to be very careful to avoid JPEG artefacts resulting in spurious pixels. If only there was a better way-

There is! Microcontroller optimisation wizard @bitbank2 - the very same wizard who created the JPEG decoded we use - has a PNG decoder. This release adds that PNG decoder to our codebase and glues it into MicroPython for all your crisp, icon-drawing needs.

Like JPEG decoding, PNG decoding supports loading files from microSD, flash and RAM, but unlike JPEG decoding there are some new options for cropping, scaling and rotating you PNG images. (Note: the order is always crop, scale and rotate.)

A basic example looks something like this:

from pngdec import PNG
png = PNG(display)
png.open_file("fire.png")
png.decode(0, 0)

But say you have a spritesheet with 8x8 sprites and you want to display a 3x2 character from it at 4x scale, you might do something like this:

from pngdec import PNG
png = PNG(display)
png.open_file("/s4m_ur4i-pirate-characters.png")

png.decode(0, 0, source=(32, 48, 24, 16), scale=(4, 4), rotate=0)

rotate rgb

The source argument is the region, in pixels, you want to show from the PNG- offset left and top, plus width and height. The whole PNG is loaded and decoded no matter what you put here, but this makes it easier to manage multiple images for things like icons.

rotate rgb

The scale argument lets you scale images up by a fixed multiplier along the X and Y axis. If you want to make an image 4x wider and 2x taller you'd use scale=(4, 2).

rotate rgb

Finally, rotate lets you rotate your PNG graphic in 90 degree intervals.

rotate rgb

Both full-colour RGB PNGs and indexed ones are supported. For indexed PNGs - ie: one that has a palette - you can supply a mode argument with one of PNG_COPY, PNG_DITHER and PNG_POSTERISE.

PNG_COPY will copy the palette indexes into a P4 or P8 graphics buffer rather than dithering or posterising (snapping to the nearest available colour).

PNG_DITHER will use a simple ordered dither matrix to dither the image colours to the available display colours.

PNG_POSTERISE will snap the colours in the PNG to their nearest display counterpart.

rotate rgb

Posterise is the default in all cases.

What's Changed

New Contributors

Full Changelog: v1.20.3...v1.20.4

Version 1.20.3

19 Jun 11:07
6fb35df
Compare
Choose a tag to compare

Bluetooth

This release bumps the MicroPython version we're building against from 1.20 to 856e08b1931b88271816a2f60648f6ff332235b2 and includes various Bluetooth-related libraries into our build. Bluetooth support should be at feature parity with the official MicroPython release. Read more about it at https://www.raspberrypi.com/news/new-functionality-bluetooth-for-pico-w/

A Knowledge Of Font

Many of you expressed a desire to work with bitmap fonts outside of the rather uninspiring set we ship with PicoGraphics.

This has led to a couple of tweaks to PicoGraphics bitmap fonts. First up-

Fixed Width / Monospaced

All of out fonts conform to a fixed grid up to 16 pixels tall and - in theory - unlimited pixels wide. Within this grid, individual characters can have different widths which are computed when the font is generated and saved into the font data. This lets us calculate text widths really quickly and lets us squeeze characters up against each other to fit more on screen.

This is not, as it happens, ideal for displaying numbers. With "1" being narrower than "0", a real-time display of some variable could cause decimal places or larger numbers to jump erratically and be difficult to read. We've added a new fixed_width= argument to text(). Specify this when you draw text in MicroPython and all the characters will behave themselves and stay a fixed distance from each other.

How does it look? Well here's bitmap8 at 2x scale in both fixed and variable modes:

buffer

Custom Bitmap Fonts

Honestly, I don't know why I waited so long to make this happen. Our fonts are just data read from memory, and the code doesn't care if that memory is flash storage (built in fonts) or allocated by MicroPython (a bytearray in a .py file or a raw font loaded from user flash).

It's always been possible to use custom fonts in C, if you were determined enough to pick apart the font structure and painstakingly key in your own pixels.

And therein lies the problem. The biggest hurdle for users wanting custom fonts is preparing the font data. Our custom format is a little weird, mostly focusing on ASCII, plus some useful characters for - loosely - supporting languages other than British English and some even weirder diacritic mark support I glued on to sort-of support some unicode.

In typical fashion I decided to solve this "problem" by getting lost in a side project for viewing, editing and converting Pico Graphics fonts - pgfutil. It's extremely alpha, but you can find it here: https://github.com/gadgetoid/pgfutil

image

To load a custom bitmap font in PicoGraphics you just pass it into set_font(). Eg:

display.set_font(open("font14.bitmapfont", "rb").read())
display.text("The quick brown fox jumps over the lazy dog", 10, 10, 240, 2)

An 8x8 font will cost you about 1k of RAM, and a 16x16 font around 3.6k. This is small compared to - for example - the 150k a 320x240 screen needs for 16-bit RGB but still big enough that you'll need to be careful how many fonts you use.

Font data is mutable, too. Do with that what you will 😆

Full Changelog: v1.20.2...v1.20.3
MicroPython changes: micropython/micropython@v1.20.0...856e08b