Development process with pHAT?

I started tinkering with my new Inky pHAT a few days back and having tons of fun. I quickly learned that you I can’t run my code locally since the library only runs on a Pi, which is fair. However, that means it adds a bit of overhead in development.

Having said that, what’s a good development process to quickly play around with displaying stuff on their pHAT. As of now, I’m editing my code in VS Code through an extension that allows me to edit files via SSH. Is there a more efficient way?

FWIW I’m running Ubuntu on my PC and this is a headless setup.

Thank you. :)


I’d probably just stay SSH’d in and use screen with a couple of tabs for running the scripts and editing (I’d probably use nano because vim still scares me, but YMMV)

1 Like

When I want to get something done with a tight feedback loop I’ll develop directly on the Pi. Usually with tmux in a 4 pane configuration. Two panes for editing/running the library/test code I’m working upon and two for reference- usually looking at an old library for reference, and keeping a Python repl open for bit shifting and testing code snippets.

I’ll then stick a datasheet up fullscreen on my desktop to work from.

It’s possible to run VS Code on the Pi too, but performance isn’t great. See:

I tried using an application (my main OS is Windows) to mount my Pi as an SSH disk, and then using VSCode to edit the files directly, but I ran into all sorts of syncronisation errors and weirdness. What’s the extension you’re using?

1 Like

I’ve never heard of running VS Code on the Pi. I’ll definitely check that out.

I’m using, or rather trying to use, SSH FS. I’m running into issues as well with a lot of wonkiness like files showing are saved when they’re not.

I thought about doing some automatic scp wizardry when files change.

Thanks for the tip, guys. Now I know I’m not missing anything. :)