# Migrating a badger2040 app to badger2350 - Moodbadger?

**URL:** <https://forums.pimoroni.com/t/migrating-a-badger2040-app-to-badger2350-moodbadger/29108>\
**Category:** Support\
**Created:** [September 27, 2026, 8:34pm UTC](https://forums.pimoroni.com/t/migrating-a-badger2040-app-to-badger2350-moodbadger/29108 "2026-09-27T20:34:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fsi](https://avatars.discourse-cdn.com/v4/letter/f/c5a1d2/32.png) [@fsi](https://forums.pimoroni.com/u/fsi)\
**Post date:** [September 27, 2026, 8:34pm UTC](https://forums.pimoroni.com/t/migrating-a-badger2040-app-to-badger2350-moodbadger/29108/1 "2026-09-27T20:34:54Z")

</div>

I’m looking for pointers on how to port a `badger2040` MicroPython app to the `Badger2350`

We have a program called [MoodBadger](https://github.com/freemansoft/MoodBadger) that aids the neurodivergent in expressing an emotional state via icons. It currently runs as the only app on the 2040 Badger. I’d like to migrate the app to the new Badger2350 (e-ink) either as a standalone or as an app in the app set.

The application is a single Python file plus an icon directory and two JSON files. One for configuration and one for updatable state that is saved before a `badger2040.turnOff()` call. The app uses these Python libraries

```python
import badger2040
import jpegdec
import uio
import ujson

```

Maybe

- `badger2040` is replaced by `badger` looks like it does not have to be imported
- `jpegdec` is replaced by `image` looks like it does not have to be imported
- `uio` is used to read and write JSON files. It is retained as a Micropython library. Does it need to be imported?
- `ujsion` is used to dump and load JSON. It is retained as a Micropython library. Does it need to be imprted?

**Sleep / power down**  
We had `badger2040.turn_off()` for the original badger is replaced by what?

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [September 28, 2026, 12:27am UTC](https://forums.pimoroni.com/t/migrating-a-badger2040-app-to-badger2350-moodbadger/29108/2 "2026-09-28T00:27:28Z")

</div>

I had a similar situation with my Tufty code. Basically, I just ran it and fixed the errors that croped up one by one.  
[Tufty 2040 \> code \> Tufty 2350](https://forums.pimoroni.com/t/tufty-2040-code-tufty-2350/28725)

---

<div class="post-metadata">

**Author:** ![bablokb](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@bablokb](https://forums.pimoroni.com/u/bablokb)\
**Post date:** [September 28, 2026, 6:43am UTC](https://forums.pimoroni.com/t/migrating-a-badger2040-app-to-badger2350-moodbadger/29108/3 "2026-09-28T06:43:26Z")

</div>

> [@fsi](#):
>
> We had `badger2040.turn_off()` for the original badger is replaced by what?

The Badger2040 had some circuitry that did cut power to the device, so the Badger2040 was really _off_. The Badger2350 is a step backward in this respect: it only switches to deep-sleep. You will notice this if you have very long off-times: power draw of the Badger2350 is probably 5-10 times higher in deep-sleep compared to the off-state of the Badger2040.

If you port your application to an app in the app set as you call it, you probably get the switch to deep-sleep automatically. For a standalone application, you need to call the appropriate method yourself.

---

<div class="post-metadata">

**Author:** ![BillyTPilgrim](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/billytpilgrim/32/12043_2.png) [@BillyTPilgrim](https://forums.pimoroni.com/u/BillyTPilgrim)\
**Post date:** [October 5, 2026, 3:35pm UTC](https://forums.pimoroni.com/t/migrating-a-badger2040-app-to-badger2350-moodbadger/29108/4 "2026-10-05T15:35:18Z")

</div>

In the new API for Badgeware, JSON is built in and just needs importing - details are here: [https://badgewa.re/docs/guides/filesystem.md](https://badgewa.re/docs/guides/filesystem.md)

There’s really quite a lot that’s changed and the new API is a lot more powerful than the old, so it may be worth thinking about rewriting from the ground up to take advantage of that while keeping things user friendly.

As far as sleeping goes, it’s as bablokb says - the badge goes into a deep sleep mode after a few seconds of inactivity. That’s accomplished simply using `badge.sleep()`, which will wake it up on a button press.

This is a fantastic use of these badges, and my initial beginner’s tutorial (offline at time of writing as I’m updating it to the new firmware version) was written with a view to being easily modifiable for this kind of application. Let me know if there’s anything else you need!

---

<div class="post-metadata">

**Author:** ![fsi](https://avatars.discourse-cdn.com/v4/letter/f/c5a1d2/32.png) [@fsi](https://forums.pimoroni.com/u/fsi)\
**Post date:** [November 3, 2026, 12:41pm UTC](https://forums.pimoroni.com/t/migrating-a-badger2040-app-to-badger2350-moodbadger/29108/5 "2026-11-03T12:41:01Z")

</div>

[GitHub - freemansoft/MoodBadger2350: MoodBadger for the Pimoroni Badger 2350 devices ( https://badgewa.re/ ) - A Badgeware port of MoodBadger for the 2400 · GitHub](https://github.com/freemansoft/MoodBadger2350) is a Badgeware port of the MoodBadger 2040 app for neurodivergent mood displays.

1. Can be added as an app to the app list.
2. Repository includes WASM simulator configuration to run the app without a device.
3. Usage video to follow

The simulator totally rocks.

 ![Screenshot 2026-11-03 at 7.39.35 AM](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/5/5fb059cf3467af2545d70878cc1aa9b886fb47de.png)

---

<div class="post-metadata">

**Author:** ![fsi](https://avatars.discourse-cdn.com/v4/letter/f/c5a1d2/32.png) [@fsi](https://forums.pimoroni.com/u/fsi)\
**Post date:** [November 15, 2026, 1:47pm UTC](https://forums.pimoroni.com/t/migrating-a-badger2040-app-to-badger2350-moodbadger/29108/10 "2026-11-15T13:47:26Z")

</div>

This also supports Badger 2350 and Tufty 2350 in the same deployable. Claude really helps when you want a single app that supports both devices.
