Pimoroni-emu: Desktop emulator for Tufty, Presto, Badger, and more!

Hi all,

I’ve been spending a lot of time lately working with Pimoroni badges, and I got a bit tired of the constant “tweak code → upload to board → reboot → wait” loop. To speed things up, I started building a desktop emulator for these boards.

GitHub: https://github.com/iksaif/pimoroni-emu

It basically mocks the picographics and board-specific modules so you can run your MicroPython scripts directly on your PC/Mac. It opens a window showing the display and maps your keyboard to the physical buttons.

Currently supports:

  • Badger 2040

  • Tufty 2040

  • Pimoroni Presto (with mouse-as-touch support)

  • Inky Frame / Inky Impression

  • Blinky 2350

It’s definitely still a work in progress, but it’s at a point where it’s actually useful for UI layout and logic testing without having to touch the hardware every 30 seconds.

If you want to give it a try: pip install pimoroni-emulator

Let me know if it works for your projects or if there are specific modules you’re missing that I should try to mock next!

3 Likes

A very nice project. I would suggest that you clarify that the emulator is running CPython, not MicroPython (maybe link to MicroPython differences from CPython — MicroPython latest documentation). This should not be a great issue though, just a thing to be aware of.

You might also want to look at GitHub - execuc/u2if: USB to interfaces implementing MicroPython "machine" module functionalities on a computer.. With this project, you could use real I2C hardware with your emulator, e.g. the pad.

Ah good idea! Will look into it :) (so far the pad is emulated too)