Playwrite: a hack to turn the Playdate into a typewriter (and use USB controllers with the console)

Hey all.

So It's very hacky and probably a bit off topic but I wanted to share this fun project I worked on, I called it Playwrite. It's a combination of a custom made, Teensy (Arduino compatible microcontroller) based dock and bespoke Lua "game".

It turns the Playdate into a retro typewriter :smiley:

The 3D printed dock uses USB serial to proxy inputs from a USB keyboard (here the mechanical Logitech POP Keys which is just perfect for the job). Arrow keys, Enter and Escape are directly mapped to the directions, A and B buttons respectively (and so are the A and S keys when not in the dedicated Playwrite game). So the keyboard can be used anywhere in the OS or in games that don't rely on the crank (not because it's unusable; but because it's just not convenient).

Then for the Playwrite app, I'm encoding keyspresses for the rest of the keys as crankchange angles in the dock and decoding them back to chars in the app. The rest is basically a text editor manipulating a Lua table. You can then export your prose to a .txt in the data directory.

It also works with gamepads, which might arguably be more useful :slight_smile:
I could probably map the right analog stick to the crank; haven't tried that yet.

I shared a little demo video, more pictures and more details on the hardware in this Twitter thread: https://twitter.com/t0m_fr/status/1576949261849149440

Cheers,

PS: they aren't available yet but I plan on sharing the sources as well if anyone's interested.

23 Likes

Hello just a quick update, sources are now available on GitHub:

GitHub - t0mg/playwrite for the experimental Lua word processor "game"

GitHub - t0mg/playwrite-dock for the dock firmware + 3d print files

I still need to update (actually create) the documentation with a few pointers and pictures :slightly_smiling_face:

Cheers

Edit: now with documentation and pictures :slightly_smiling_face:

4 Likes

This is really brilliant. I always wanted an e-ink typwriter display, and this is even better.

Maybe start selling units on etsy? I'd be interested.

If some entrepreneur wants to run with that idea, it looks like the dock is released under the MIT license.

Note that the freewrite sells for over $600 and sells like hotcakes:
https://www.amazon.com/dp/B09V37Q6GP?tag=relibrar-20&linkCode=osi&th=1&psc=1

This is nice because people can choose the keyboard they like.

2 Likes

Haha thanks. I didn't know about freewrite before doing this project but it sure looks similar. A foldable/portable version of the Playwrite dock is certainly doable and with a bit of software development would come fairly close. @dave told me that it should also eventually become much simpler to send data to the playdate via serial, making my hack obsolete and most importantly the data transmission faster and more reliable.

So yeah, I'm not going to start a business but a v2 of this dock is certainly within reach and could bring us close to the freewrite use case, along with better external controller support.

And for V3 we can add an HDMI out for a full Switch-style dock experience :slight_smile:

1 Like

Necro'ing this thread to say if your keyboard already has a user-addressable microcontroller with USB host support in it, you can skip the dock and talk to the Playdate directly!

Here, I've bodged Tom's crank encoder from the dock into the Solder Party BBQ20KBD, which has an RP2040 under the hood. This method only needs a powered USB-C connection between the two (there's a powered USB hub in the background), no intermediary microcontroller.

Video at aworkth.ing, too. Is this the first "third-party" keyboard for Playwrite?

6 Likes

Thanks for sharing, very cool! :heart_eyes:

1 Like

This would come in very handy for using my MicroPython REPL on the go!

If anyone is working on defining a standard protocol for keyboard input over the msg serial command (preferably one that can coexist with my protocol for byte-stream input), I would be interested in supporting that in PewPew.

The msg command didn't exist when I made this project, which is why I came up with the crank encoder hack. In the camera project I used another hack which allows executing a lua function with an arbitrary payload in order to stream images to the playdate. But yes now that msg is a thing it feels like it's the way forward, and it shouldn't be hard to rewrite the Playwrite app to support this protocol.