MicroPython Magic Memory
Okay so 1.19.17 was a bit of a memory corruption disaster. It turned out that - despite our best efforts - our C++ code was still assuming it had heap RAM it could use at its leisure. This was... sort-of... the case, except MicroPython's heap overlapped this same memory with disastrous and unpredictable results.
This is a re-issue of sorts, fixing the critical flaws in 1.19.17 but not introducing much else.
This change fixes some init heap usage in LTR559, LTP-305 (Dot Matrix display breakout) - removing almost 10k of memory usage - and PicoGraphics and introduces a new module
cppmem which quietly redirects C++ heap allocations over to the MicroPython heap.
- Inky Frame: add new examples and update sample images by @helgibbons in #713
- Scroll Pack: Fix demo.py by @helgibbons in #723
- Docs: Fix link by @helgibbons in #727
- Add reference to 7.3 inkyframe by @tjp in #729
- MicroPython: Magic C++ Memory Management. by @Gadgetoid in #725
- Badger 2040: Add deprecation warnings and firmware links. by @Gadgetoid in #722
- Move boot.py to modules_py.cmake by @Gadgetoid in #730
- MicroPython: Various networking fixes to code & examples. by @Gadgetoid in #731
- CI: Bump MicroPython to 38e7b84. by @Gadgetoid in #732
- Refactor out remaining C++ heap usage during init. by @Gadgetoid in #733
Full Changelog: v1.19.17...v1.19.18
MicroPython Changes: micropython/micropython@05bb260...38e7b84
A recent change in MicroPython took away the last remaining drips of heap memory that some of our modules (erroneously) relied upon, this release is mostly a great sweeping set of changes to fix these instances and ensure we can continue to follow the latest and greatest MicroPython changes and integrate Bluetooth when it comes.
This is a pretty significant set of changes which may not be complete, if you encounter issues let us know and try version 1.19.16 instead.
Most of these changes have no user-visible effect and everything should work as before, with the notable exception of:
Unicorn Pack & Scroll Pack
As part of these changes both Unicorn Pack and Scroll Pack received a refactor into MicroPython class style modules, so:
import picounicorn picounicorn.init()
from picounicorn import PicoUnicorn picounicorn = PicoUnicorn()
As an added bonus we've thrown in PicoGraphics support for both of these boards. Neither benefit particularly from all that fancy graphics stuff, but it's nice to have party. PicoGraphics for Scroll Pack and Unicorn Pack works like it does for Cosmic/Galactic Unicorn, here's a minimal example for Scroll Pack:
from picographics import PicoGraphics, DISPLAY_SCROLL_PACK, PEN_P8 from picoscroll import PicoScroll graphics = PicoGraphics(DISPLAY_SCROLL_PACK, pen_type=PEN_P8) scroll = PicoScroll() while True: graphics.set_pen(0) graphics.clear() graphics.set_pen(255) graphics.text("Boo", 0, 0, scale=1) scroll.update(graphics)
update() method now accepts a PicoGraphics instance, if you want to use it without PicoGraphics you can call
Bye bye Badger Builds
The builds for Badger 2040 and Badger 2040 W have been removed. You should head over to https://github.com/pimoroni/badger2040/releases where you'll find ongoing releases for Badger boards.
- MicroPython: Tidy up CMake files for our boards. by @Gadgetoid in #709
- clock.py: constrain hour to 0 to 24 by @mogenson in #715
- i75/i75w: Auto-detect board and set up user button. by @ageeandakeyboard in #655
- MicroPython: Avoid heap allocations in all C++ modules. by @Gadgetoid in #711
Full Changelog: v1.19.16...v1.19.17
MicroPython Changes: micropython/micropython@294098d...05bb260
This release includes a number of improvements to all Inky Frame boards, spurred by Inky Frame 7.3".
inky_framemodule now includes colour constants and handy functions to manage Inky Frame when it's running on battery.
pimoronimodule now includes a
PWMLEDclass which handles a single LED with brightness and on/off control.
inky_frameLEDs are now driven by
PWMLEDand have variable brightness control.
set_thickness()now works for Inky Frame (and all PicoGraphics pen types, in fact), allowing you to control the thickness of the lines used to render Hershey fonts. Text can be oooh so much prettier.
line()now supports a fifth argument, "thickness", letting you draw thick lines at any angle. This is great fun for really slow analogue clocks and other UI elements that involve thick lines that rectangles can't accomplish.
A PicoGraphics instance for Inky Frame will now raise a
ValueErrorif you try to access the raw framebuffer with
memoryview(graphics). It's backed by PSRAM so there's no memory to access... yet!
A bug has been fixed in PCF85063A driver, allowing you to set the time more than once.
See the Inky Frame module documentation for details about new (and old) features, caveats and so on.
- Contribute an automatic display brightness example by @LionsPhil in #701
- Fix small typo in README by @antonmosich in #708
- Inky 7.3 tweaks & docs by @Gadgetoid in #702
- @antonmosich made their first contribution in #708
Full Changelog: v1.19.15...v1.19.16
Version 1.19.15 mostly adds support for a couple of new and shiny things but we've also taken the opportunity to make improvements to some existing products-
Galactic Unicorn firmware now includes numpy, and we've included a directory full of examples to show you how you can use it for all manner of dynamic effects and crude simulations.
To make these effects a little easier to produce we've also added support for palette-mode pens to Galactic, most of the examples use
PEN_P8 which means every pixel on Galactic Unicorn is represented by one 8-bit number that provides an index into a palette of your choice.
You can now use
create_pen(r, g, b) with Inky Frame and PicoGraphics will try its best to dither your drawing to the 7 colours that Inky is capable of producing. This works best on large blocks of colour such as backgrounds or chunky text.
You can also use
dither=False in JPEG decoding, causing JPEG files to be quantized to Inky's 7 colours rather than dithered. This is useful if you're using an image as a background for your project, or just want the cool posterisation-style effect.
PicoGraphics has a new
create_pen_hsv(h, s, v) method, which replaces all of the copy-pasted
hsv_to_rgb functions in our various examples with a faster, tidier implementation. Creating hsv pens works in all pen modes, and will either return a palette index or an appropriately converted RGB colour for you to use with
set_pen as normal.
No Bluetooth, Yet.
While this is the first release built against Pico SDK 1.5.0, the new Bluetooth functionality is not yet available in MicroPython.
For a demonstration of Bluetooth doing something on Galactic/Cosmic see: https://github.com/Gadgetoid/galactic-bluetooth-audio/
- CI: Upload Badger 2040 W examples .uf2 to release files. by @Gadgetoid in #670
- some minor docs tidying by @helgibbons in #671
- CI: Bump MicroPython to latest commit post Pico SDK 1.5.0 bump. by @Gadgetoid in #672
- Few more Interstate examples by @helgibbons in #648
- Update to Badger 2040 W getting started by @Zoobdude in #673
- Support for Inky Frame 7.3" (using direct pen into PSRAM framebuffer) by @Gadgetoid in #663
- Cosmic by @ageeandakeyboard in #641
- CI: Don't include debug .elf files in artifacts. by @Gadgetoid in #677
- Cosmic Unicorn: Launch Examples. by @Gadgetoid in #676
- Update function names in readme by @Zoobdude in #679
- Patch: fixed error caused by missing secrets.py by @thirdr in #678
- List index out of range fix, remove default QR message if text files are available and file housekeeping by @SimonShirley in #658
- Added a pico display 2.0 Mandelbrot set example. by @Gadgetoid in #680
- Inky 7.3: C++ library and JPEG example compatibility. by @Gadgetoid in #682
- Inky 7.3: Support dithering of arbitrary colours. by @Gadgetoid in #685
- fixed example for automation2040wmini by @rabid-inventor in #533
- Driver for the mlx90640 thermal camera by @Gadgetoid in #225
- PicoGraphics: Include dependencies if necessary. by @Gadgetoid in #686
- CI: Separate CCache cache for Pico/PicoW. by @Gadgetoid in #687
- added in the wifi examples from another branch by @ageeandakeyboard in #683
- Cosmic Unicorn: Port paint example. by @Gadgetoid in #694
- Cosmic: tidy examples and docs by @helgibbons in #696
- Cosmic Unicorn: Eighties super computer in numpy/ulab. by @Gadgetoid in #697
- PicoGraphics: correct hsv pen reference by @helgibbons in #699
- CheerLights example for the Galactic Unicorn by @Corteil in #546
- Launcher for Inky Frame 7.3" by @thirdr in #695
- Galactic: add CO2 breakout example by @helgibbons in #700
Full Changelog: v1.19.14...v1.19.15
List of changes to MicroPython since Pimoroni Pico release v1.19.14: micropython/micropython@35524a6...294098d
Badger Badger Badger WiFi WiFi
This release adds support for Badger 2040 W which is, as the name suggests, a wireless version of Badger 2040. We've switched to PicoGraphics for this version (we'll migrate Badger 2040 once the bugs are ironed out). It includes breaking changes from older Badger code, so you should consult the Badger 2040 W Python README to see what's changed.
PicoGraphics has also gained an HSV Pen thanks to @ageeandakeyboard, allowing a pen to be created from (hue, saturation, value) values, avoiding the need to calculate the RGB result in Python. Try
set_pen_hsv(h, s, v).
Thanks to @LionsPhil for tweaking the Tufty 2040 Launcher/Menu to be a lot more RAM friendly, to @MichaelBell for fixing the ghosting issue in Galactic Unicorn and @ahnlak for adding RGB332 Pen support into Galactic Unicorn.
- Update CI status badges on README.md by @Gadgetoid in #636
- Correct RAM units by @helgibbons in #638
- Update docs and add links by @helgibbons in #639
- Plasma: Swap make_new/print functions for WS2812 module. by @Gadgetoid in #640
- CI: CMake build for Pico W and Pico. by @Gadgetoid in #651
- CI: Bump MicroPython to 67fac4e. by @Gadgetoid in #649
- Added PEN_RGB332 support by @ahnlak in #659
- PicoGraphics: HSV Pen by @Gadgetoid in #665
- Fix ghosting on the Galactic Unicorn by @MichaelBell in #666
- CI: Generate version.py for #664. by @Gadgetoid in #667
- Add support to Interstate / HUB 75 for panels with different color orders by @ZodiusInfuser in #660
- Rewrite the Tufty2040 main menu somewhat by @LionsPhil in #668
- Badger2040w by @Gadgetoid in #633
Full Changelog: v1.19.12...v1.19.14
- @LionsPhil made their first contribution in #668
Upstream Upgrade Avalanche
This release bumps the MicroPython version we're building against, including significant changes and bugfixes.
Additionally, non-wireless boards are no longer built against the stable v1.19 MicroPython version and are instead synced with the latest, unreleased fixes.
This also means we should better align with the official releases of MicroPython, and we now include "mip" and "ntptime" in W builds as we should!
For an exhaustive list of changes see:
- Wireless boards: micropython/micropython@9dfabcd...699477d
- Non-wireless boards: email@example.com...699477d
- Fixed typo with inventor examples by @ZodiusInfuser in #621
- add link by @helgibbons in #627
- MicroPython: Update to support new slots mp_obj_type_t. by @Gadgetoid in #515
- Patch/inky launcher 57 update by @thirdr in #626
- Fix BME68x configure function by @helgibbons in #625
Full Changelog: v1.19.11...v1.19.12
Note from the future: If you're using Plasma 2040 or Plasma Stick then you should skip this release - the builds below contain a bug that affects the Plasma library. Use v1.19.11 instead!
PicoGraphics for HUB75
- correct sine wave in calc.py by @helgibbons in #585
- Add festive Plasma Stick examples by @helgibbons in #592
- Use http instead of https to avoid memory errors by @helgibbons in #599
- update to the hub75 drivers to make them compatible with Picographics by @rabid-inventor in #601
- JPEGDEC/PicoGraphics: Add support for RGB888 target. by @Gadgetoid in #600
- Unicorn volume fix by @ahnlak in #603
- Correct badge picture dimensions by @housten in #602
- Fetch pimoroni-pico SDK from git repository by @thinkofher in #388
- MicroPython: Create inky_frame module for buttons. by @Gadgetoid in #569
- Update actions for deprecation warnings by @Daft-Freak in #606
- Inky Frame Build by @Gadgetoid in #605
- Launcher + Examples for Inky Frame by @thirdr in #608
- usb-fix for Inky Frame Launcher by @thirdr in #609
Full Changelog: v1.19.10...v1.19.11
Go Gaga for Gorgeous Graphics
This release adds support for Pico GFX Pack's RGB-backlit 128x64 monochrome LCD.
- change default colour order by @helgibbons in #538
- tweak micropython docs by @helgibbons in #539
- Switched the Plasma Stick colour order and fixed BME280 example by @ZodiusInfuser in #540
- Update Pico Unicorn readme by @helgibbons in #543
- Add note about LED colour order by @helgibbons in #544
- make function reference consistent by @helgibbons in #547
- Added launch software for Galactic Unicorn, and improved other examples by @ZodiusInfuser in #550
- More Galactic Unicorn Examples by @ZodiusInfuser in #552
- Add time synchronization from NTP to GU clock example by @MichaelBell in #553
- Added Galactic Unicorn function reference and example by @lowfatcode in #557
- pull GU function reference by @helgibbons in #558
- Tidy Galactic Unicorn docs by @helgibbons in #559
- Driver/st7567 by @rabid-inventor in #561
- Fix setting the LTP305 brightness by @MichaelBell in #555
- Fix typo galactic_unicorn feature_test_with_audio.py by @johnmccabe in #565
- GFX pack examples and docs tweaks by @helgibbons in #568
- Badger2040: Make the LED example pulse instead of strobe by @ahpook in #577
- Driver/st7567 by @rabid-inventor in #581
Full Changelog: v1.19.9...v1.19.10
- @johnmccabe made their first contribution in #565
- @ahpook made their first contribution in #577
Let There Be Light
This release adds support for Plasma Stick and Galactic Unicorn.
- Automation Mini tidyup by @helgibbons in #532
- Plasma Stick examples by @helgibbons in #536
- Galactic Unicorn by @Gadgetoid in #537
Full Changelog: v1.19.8...v1.19.9
This release tentatively brings v1.19.7 features to a "stable" version and - thanks to @MichaelBell - tweaks how graphics data is copied to displays, hopefully fixing some glitches seen on Tufty 2040.
We've also added a way to disable JPEG dithering in RGB332 mode, giving you a posterised effect instead. See: #492
Thank you to our five new contributors!
- ST7789 Parallel: Work with SYS clock faster than default by @MichaelBell in #487
- JPEGDEC: Add option to disable dither on RGB332. by @Gadgetoid in #492
picoexplorerreferences by @helgibbons in #498
- set pen for text to 15 for better visibility by @dreambucket13 in #514
- Pico Graphics: Double buffer scanline conversion by @MichaelBell in #422
- PicoGraphics: Fix a bug that broke #422 by @Gadgetoid in #516
- Add Progress Pride flag to pride badge example. by @TimAidley in #506
- Add link to common files by @helgibbons in #517
- Update README.md by @helgibbons in #526
- Move set_brightness to APA102 by @PeterCopeland in #525
- Correct common path by @gauntface in #520
- Support for Inky Frame 4.0" by @Gadgetoid in #527
- Plasma: Use m_new to alloc buffer on gc_heap if not supplied. by @Gadgetoid in #528
- Add adjust_to_sea_pressure function by @adriangalilea in #491
- Auto2040w mp pwm by @rabid-inventor in #489
Full Changelog: 1.19.7...v1.19.8
- @dreambucket13 made their first contribution in #514
- @TimAidley made their first contribution in #506
- @PeterCopeland made their first contribution in #525
- @gauntface made their first contribution in #520
- @adriangalilea made their first contribution in #491