Skip to content

3D printed, DIY macropad powered by Rust and rp2040 👻

Notifications You must be signed in to change notification settings

nmattia/ghostwriter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Ghostwriter logo

Ghostwriter

A 3D-printed USB macropad based on the Tiny 2040, with customizable Rust firmware.
Getting Started »

Printables Page · Report Bug · Onshape Project

Built with:
RaspberryPi rp2040 Rust Language Onshape

Table of Contents
  1. About The Project
  2. Getting Started
  3. Building
  4. Contact
  5. Acknowledgments

About The Project




Ghostwriter DIY USB macropad




The Ghostwriter is a small, customizable macro pad based on the Tiny 2040 development board (with RaspberryPi rp2040 inside).

It has a single button — can be used to write a letter, start a macro, etc — and an LED for feedback. It connects through USB-C and shows up as a USB device.

Everything (from the LED color and blinking patterns, button actions, USB product display name) is configurable in the source code. Some pre-built firmwares are also available (see Getting Started).

(back to top)

Getting Started

To install the lorem firmware — spitting out lorem ipsum on the press of a button — follow the next steps.



Ghostwriter printing lorem ipsum

Note

These instructions focus on the Firmware. For instructions on how to 3D print the Ghostwriter case please refer to the Printables page.

Prerequisites

In order to install the firmware (lorem) you need:

Installing the Firmware

  1. Download the lorem.uf2 firmware from the Release page.
  2. Press the boot button of the Tiny 2040 and (with the boot button pressed) connect it to your computer via USB. NOTE: If you have printed the Ghostwriter case, the boot button is the (one and only) button pressed when you squeeze the case.
  3. Verify that the Tiny 2040 is mounted as removable storage.
  4. Drag and drop the lorem.uf2 firmware to the removable storage volume.
  5. SUCCESS! The Tiny 2040 reboots and loads the firmware.

The eyes (the LED) should be green and blinking slowly. Open a text editor and press the boot button (or squeeze the case). The eyes are now lavender-pink and blinking fast. The Ghostwriter is writing to your text editor. The Ghostwriter will keep writing (potentially starting the lorem ipsum over) until you press it again.

See the Building section for instructions on how to build and tweak the code yourself.

(back to top)

Building

Make sure you have a recent vesion of Rust installed, as well as the right target for the rp2040:

rustup self update
rustup update stable
rustup target add thumbv6m-none-eabi

Build the lorem firmware:

cargo build --release --bin lorem

Make sure elf2uf2-rs is installed. Then deploy the firmware to the Tiny 2040 (ensure the device is connect and in boot mode, i.e. boot was pressed when plugging the device):

Note

The command below uses the runner specified in .cargo/config to convert the cargo-built ELF file to uf2 and deploy it to the connected Tiny 2040.

cargo install elf2uf2-rs
cargo run --release --bin lorem

(back to top)

Contact

Nicolas Mattia - @nasmattia - nicolas@nmattia.com

Project Link: https://github.com/nmattia/ghostwriter

(back to top)

Acknowledgments

(back to top)