Skip to content

Releases: pimoroni/pimoroni-pico

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

Version 1.20.2

12 May 13:38
00d1617
Compare
Choose a tag to compare

You Spin Me Right 'Round

Tufty 2040: Firmware should now work and includes a fix to Tufty's native (RGB565) update code to reduce a typical screen update from ~30ms to ~10ms.

Cosmic Unicorn: Ghosting should be fixed in (just like Galactic).

Pico Display Pack 1.14": A fix to LCD init.

Ulab has been bumped to 6.0.12 where it's available (Tufty, Cosmic, Galactic).

Support added for the shiny new RGB Encoder Wheel breakout 👀

We're still building against MicroPython stable v1.20.0 and will continue to do so until there are some irresistible updates upstream. Quite a few changes have been made to streamline our build process and this may have introduced some regressions. Let us know if something is missing or broken.

🎉 Thank you to contributors new & old! 🎉

What's Changed

Full Changelog: v1.20.1...v1.20.2

New Contributors

Version 1.20.1

28 Apr 15:46
56dba37
Compare
Choose a tag to compare

(ノ◕ヮ◕)ノ✲゚。⋆ [ɥɥɥɥɥƃƃƃƃ]ɹɹɹɐɐɐɐ

In my haste to release 1.20.0 I fell into a trap- a MicroPython C memory handling trap. One iiickkle tinnny change that I hadn't testing against turned out to be the one that broke all of our builds. This release fixes that, before someone makes me walk the plank.

As before, nothing much has really changed except for a version bump and some (apparently not as) minor (as I thought) changes.

ℹ️ since we'll tracking unstable MicroPython from this point onwards, the v1.20.x moniker doesn't mean all that much. We'll bump x every time we release a new version with new Pimoroni Pico libraries. Our point releases are unrelated to MicroPython's own point releases so it's just as well that those are extraordinarily uncommon.

Note from the future - the v1.20.1 image for Tufty 2040 is bugged. If you have a Tufty, best to use v1.19.18 for now.

What's Changed

Full Changelog: v1.20.0...v1.20.1

Version 1.20.0

27 Apr 14:50
f097577
Compare
Choose a tag to compare

Major MicroPython Milestone

Woah, woah. A version 1.20.0 of MicroPython! Surely that means lots of new great things in Pimoroni Pico MicroPython right, right?

Well... uh... it's not a particularly well-kept secret that we've (and, indeed, the official builds) been tracking the latest MicroPython changes since the Pico W. As such this release is mostly a formality and really nothing of consequence has changed since Pimoroni Pico v1.19.18.

Still, we're going to celebrate anyway: 🎉 🎉 🎉 🎉 🎉 🎉 🎉

What's Changed

Full Changelog: v1.19.18...v1.20.0

MicroPython Changes: micropython/micropython@38e7b84...v1.20.0

New Contributors