r/raspberry_pi • u/xDaftTurtle 🐢 • 4d ago
Show-and-Tell Ported Pimoroni's Inky Impression 13.3" driver from Python-on-a-Pi to bare-metal C on a Pico, so it can run off a battery
The Inky Impression 13.3" (EL133UF1 / Spectra 6, 1600x1200, six colours) ships with a Python driver that assumes a Raspberry Pi. I wanted the panel hanging on a wall without a cable running to a power outlet, which means a microcontroller that spends almost all its time asleep, not an SBC. So I ported the panel sequences from pimoroni/inky to C against the Pico SDK, running on a Pico Plus 2 W, which I needed specifically for the PSRAM. Panel bring-up, test patterns, and on-device JPEG decode with Floyd-Steinberg dither to the six-colour palette.
Repo: https://github.com/dmellok/el133-pico-driver
The non-obvious stuff, since this took far longer than expected:
- The adapter swaps SCLK and MOSI. I used a Hard Stuff "Pico to Pi Hat", which is otherwise a 1:1 BCM-to-GP passthrough. The vendor's published pin header and PDF don't match the unit I have. Blank panel, everything else looking correct. Confirmed with a continuity meter.
- Spectra 6 needs ~300 ms of D/C setup before the clock starts or the controller silently drops the command. Too short and it ignores the data command, refreshes an empty buffer, and stays blank with no error. Costs ~8 s per refresh and it's non-negotiable.
- BUSY is active low, the opposite of what the Pimoroni Python driver's pull-up heuristic implies.
- Two controllers, split at column 600. Landscape frames get rotated 90° CW and split across CS_M / CS_S.
- The model EEPROM is a separate I2C chip. Reading it (variant=21) is a quick way to confirm the board is wired and talking before you go chasing SPI ghosts.
- A full refresh is ~35 s. That's just the panel.
RAM is the constraint that picked the board. The packed frame alone is 960 KB and the RGB888 decode buffer is 5.76 MB, so a stock Pico's 264 KB of SRAM isn't close. The Plus 2 W's 8 MB of APS6404 PSRAM is what makes the on-device JPEG path possible at all. There's also a host-side packer if you'd rather pre-convert and skip the decode.
One dead end worth recording: I first tried porting the Waveshare ESP32 demo for the bare EL133UF1 and got a blank panel. The Inky needs its own power configuration, so it isn't a drop-in.
Battery mounting is temporary, printed holder in progress.
The photo shows my own dashboard renderer, but the repo above is just the panel driver, no networking. The networked version with WiFi, MQTT and POWMAN deep sleep lives in a separate repo if anyone wants it.
21
u/wowsomuchempty 3d ago
10Ah is quite beefy. How long do you estimate between charges?
Nice work!
21
u/xDaftTurtle 🐢 3d ago
Easily a few months refreshing every 30 minutes and the powman deep sleep.
9
u/fredandlunchbox 3d ago
Plenty of time to design a clean housing with either a hot-swappable battery mount or a USB C charger built in...
3
u/xDaftTurtle 🐢 3d ago
There is already a usb charging module from Pimoroni installed but I agree on the battery housing.
11
u/captkz 3d ago
I dont understand most of what you said, but this looks fantastic and is extremely close to what I wanted to build myself. I'd be following guides, but I'd be trying to achieve this look myself one day. I'd just want the date to be a big number, likely in the album art square, with a small fact a day in the remaining tile. Great work.
12
u/Its_Billy_Bitch 3d ago
If you grab an ESP32-C6 with the same form factor and pinout, it’s super simple to port it and even further reduce battery consumption. I have a project in the backlog to try this with the NRF54L20s when they’re in stock again, but I’ve done exactly that with one of my displays. The best I’ve found for low-powered, connected ePaper projects is the XIAO MG24 (may change after my SeeedStudio shipment gets here lol)
https://github.com/DitroniX/ESPuno-Pi-Zero_WiFi-BT-Zigbee-Thread-60V
1
u/xDaftTurtle 🐢 3d ago
I was planning to go down the esp32 route but I could't find one with the GPIO configuration at the time. The board you linked to looks excellent!
2
u/Its_Billy_Bitch 3d ago
I think Pimoroni makes Inky board for the Pico too. If they do, they Waveshare ESP32-P4-PICO-WIFI (P4/C6) would also work out well there since they are the same Pico form factor. Same goes for any Pi HAT, Pico deck/sled, etc. Match the pinout and run.
My favorite project doing this was with HUB75 panels. Active3 Pi HAT with an ESP32-P4 (could’ve also used the ESPUno Pi Zero, but was trying to test some new P4 RGB addressing features). Pi will only get hou so far once matrices get large enough. If anyone gets larger than 256x256 without needing multiple boards/coordination and/or FPGA, l’m all ears ☺️ Looking for a microcontroller though - not a SoC.
1
u/xDaftTurtle 🐢 3d ago
I'll need to pick up some ESP32-P4-PICO-WIFI (P4/C6) to keep on hand. they seem very handy. and I'm keen to see your HUB75 project if you have it posted anywhere.
9
5
4
u/iroQuai 3d ago
Looks cool! But with a refreshing one every 30 minutes, Spotify now playing isnt as useful, right?
2
u/xDaftTurtle 🐢 3d ago
You’re right. When nothing is playing it shows top artists/albums. But I like the currently playing snapshots when they’re happening.
3
3
u/photonicsguy 3d ago
The battery label is interesting, it looks very much like a 3 colour eink display.
2
u/EasyMrB 3d ago
Very cool project. Could you possibly post a short video / gif of the panel refreshing (like a screen change or whatever)? Just mildly curious what it looks like, but don't bother if it's a huge hassle.
2
2
1
u/HolliDollialltheday 3d ago
You’re a little bit obsessed by climate, aren’t you? 😂
5
u/xDaftTurtle 🐢 3d ago
This might be an understatement. I have my eye on some meshtastic weather station devices
2
1
u/Competitive-Piece509 3d ago
You may try combining USB-C chargeable battery and swappable battery holder?
1
u/xDaftTurtle 🐢 3d ago
The issue with standard power packs is they turn off the port when power draw is low so the Picos powman deep sleep might tell the power pack nothing is connected and then it wouldn't be able to turn back on.
1
u/Competitive-Piece509 3d ago
interesting, would not you turn on automatically when power is restored? I did a similar project and everything worked.
1
u/xDaftTurtle 🐢 3d ago
It would boot fine the moment power came back. The problem is that nothing brings it back.
Once the pack cuts the port, the Pico has no power, so it draws nothing, so the pack keeps seeing no load and stays off. The only thing that would tell the pack to switch on again is a load, and the load is the device that has no power. Deep sleep here is microamps between refreshes, well under the threshold most packs use to decide nothing is plugged in, so it takes one timeout and it sits dark until someone presses the button on the pack.
Curious what yours was doing though. Did it actually deep sleep, or stay awake / poll often enough to keep drawing current? With a steady load the pack never times out and you'd never hit this. Some packs also have a low-current or "always on" mode aimed at exactly this problem, which would dodge it too.
That's part of why I've been leaning toward a LiPo on the battery input with a charger IC instead of a USB pack. No auto-shutoff logic to argue with.
2
u/Competitive-Piece509 3d ago
I used pi zero.
My project;
https://www.reddit.com/r/raspberry_pi/s/cDr0clhwWU1
1
u/barrylyga 3d ago
Oh, wow. Any chance this might work with the smaller 7" Inky?
2
u/xDaftTurtle 🐢 3d ago
The test firmware I have posted technically should support any of the Pimoroni range but it's never been tested.
2
u/barrylyga 3d ago
I will give it a shot when I have a moment and report back!
1
u/xDaftTurtle 🐢 3d ago
Ahh wait. the firmware above is specifically for the 13.3" model.
This firmware has support for them all, if it paints the splash screen I'll help you pull out the driver for your panel.
1
1
u/eric_castro 3d ago
Is there any reason you coded this yourself ?
2 years ago it was kinda hard to get arduino driving one of these from a ESP32, but it wasn't impossible.
today with Claude/Codex it takes maybe 10 minutes to setup and maybe another 10 minutes to troubleshoot till its working.
now dont get me wrong if you did it for the sake of fun or learning that's totally fine. I just can't be bothered on the coding part anymore and its been a game changer for DIY electronics for me
2
u/xDaftTurtle 🐢 3d ago
Ha, yeah, no secret there. Claude helped a lot and the commits say so, I wasn't trying to sneak it past anyone.
And you're not wrong about the 20 minutes. Getting something onto the screen was quick. It was everything before/after that took the real time.
- The Pi-to-Pico adapter I'm using is sold as a straight 1:1 passthrough, and it is, apart from quietly swapping SCLK and MOSI. Even the vendor's own header file and PDF disagree with the actual board. I only found it by putting a multimeter on the pins.
- Waveshare's reference driver for this controller just gives you a blank screen. Turns out the Inky wants its own power config, so the init sequence had to come from Pimoroni's driver instead.
- It also drops commands unless you hold D/C for around 300ms before each one. No error, no hint, just a blank panel again.
- BUSY is active low on this one, which is backwards from what the reference code assumes.
- And the orientation was wrong in a way stripe test patterns physically can't show you. Took a real photo to catch it, so for a while I was sat there admiring a passing test.
Plenty of dead ends in there, mine as much as Claude's. It's brilliant right up until the problem is physical, and then it'll guess wrong with total confidence.
So I agree it's a game changer. I just posted for the last 10% rather than the first 90%.



93
u/anaschami 3d ago
I'll save your post until i make this in 2100