# Not A Typewriter

## Overview

https://youtu.be/khEFYlZObyA

https://youtube.com/live/Z-Sb5L-gl7c?feature=share

![](https://cdn-learn.adafruit.com/assets/assets/000/137/771/medium800/3d_printing_hero-keybo.jpg?1750091818 )

Build a "Not A Typewriter" with I2C Solenoid Driver and Adafruit Feather RP2040 running CircuitPython code. This device is designed to give your modern computer keyboard the essence of a vintage typewriter.

The 3D printed case is designed to look like a classic typewriter and features a real service bell. It has two mini solenoids, one to emulate the loud clack of the typebars, and the other to triumphantly announce the ding of the carriage return.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/805/medium640thumb/3d_printing_ring-loop.jpg?1750103028)

## Inspiration

This project was inspired by [Tetora Tech Lab's Fake Type Writer project](https://x.com/TetoraTechLab/status/1719719834525827270)we saw posted on x.com. Their project is open source and [available on GitHub](https://github.com/ryoono/FTW-TT_50_USB).

![](https://cdn-learn.adafruit.com/assets/assets/000/137/813/medium640/3d_printing_tetoratechlab-FTW.jpg?1750168829)

## Two Flavors of Typewriter

There are two methods that you can choose from to bring your modern typing back to the age of Mad Men.

### Bring Your Own Keyboard

You can plug a [USB keyboard into the USB host Feather](https://learn.adafruit.com/not-a-typewriter/use-the-usb-host-code) and plug the Feather into your computer. The Feather hosts the keyboard and sends its keystrokes to your computer. And of course, the solenoids trigger depending on the keys that are pressed.

![the not a typewriter connected via usb to a usb keyboard](https://cdn-learn.adafruit.com/assets/assets/000/137/815/medium640/3d_printing_hero-ipad.jpg?1750171571)

## Computer Accessory

But what if you're on a laptop, writing the next great American novel in the spirit of Jack Kerouac or pushing the boundaries of gonzo journalism like Hunter S. Thompson? You can run a [CPython script on your computer](https://learn.adafruit.com/not-a-typewriter/use-the-desktop-python-code) that sends your keystrokes to the Feather over serial. The Feather runs CircuitPython code that listens for the incoming keystrokes and triggers the solenoids.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/816/medium640/3d_printing_hero-laptop.jpg?1750171686)

# Parts from Adafruit
### Adafruit Feather RP2040 with USB Type A Host

[Adafruit Feather RP2040 with USB Type A Host](https://www.adafruit.com/product/5723)
You're probably really used to microcontroller boards with USB, but what about a dev board with two? Two is more than one, so that makes it twice as good! And the&nbsp; **Adafruit Feather RP2040 with USB Host** is **&nbsp;** definitely double-the-fun of our other Feather...

In Stock
[Buy Now](https://www.adafruit.com/product/5723)
[Related Guides to the Product](https://learn.adafruit.com/products/5723/guides)
![Angled shot of black rectangular microcontroller with USB C and USB A connectors at both ends.](https://cdn-shop.adafruit.com/640x480/5723-00.jpg)

### Adafruit I2C to 8 Channel Solenoid Driver

[Adafruit I2C to 8 Channel Solenoid Driver](https://www.adafruit.com/product/6318)
Solenoids are a little like cats: if your project has one solenoid you'll probably stick with just one and in such cases our [single MOSFET driver will work well](https://www.adafruit.com/product/5648). But if you have more than one solenoid, it's going to be anywhere from 2...

In Stock
[Buy Now](https://www.adafruit.com/product/6318)
[Related Guides to the Product](https://learn.adafruit.com/products/6318/guides)
![Video of breakout board connected to eight solenoids, which pulse on and off.](https://cdn-shop.adafruit.com/product-videos/640x480/6318-05.jpg)

### Blue USB Type C to USB A Cable with 540 Degree Rotating End

[Blue USB Type C to USB A Cable with 540 Degree Rotating End](https://www.adafruit.com/product/6278)
Some days we're feeling extra fancy here at the 'fruit warehouse, and we have a big soft spot for colorful&nbsp;cables that make our projects look like Transformers. Like, peep [this fully reversible pink/purple Blinka-inspired cable](https://www.adafruit.com/product/4111)....

Out of Stock
[Buy Now](https://www.adafruit.com/product/6278)
[Related Guides to the Product](https://learn.adafruit.com/products/6278/guides)
![Angled Shot of the Blue USB Type C to USB A Cable with 540 Degree Rotating End 1m.](https://cdn-shop.adafruit.com/640x480/6278-07.jpg)

### Mini Chiclet Keyboard - USB Wired - Black

[Mini Chiclet Keyboard - USB Wired - Black](https://www.adafruit.com/product/1736)
Add a good quality, slim keyboard to your&nbsp;Raspberry Pi, Beagle Bone Black, or other single-board-computer with this sleek black chiclet keyboard. It's a full QWERTY keyboard with a USB cable and is compatible with all operating systems. We tried many keyboards to find one that felt...

In Stock
[Buy Now](https://www.adafruit.com/product/1736)
[Related Guides to the Product](https://learn.adafruit.com/products/1736/guides)
![Angled shot of a Black woman's silver-blue manicured hands on a slim, black keyboard.](https://cdn-shop.adafruit.com/640x480/1736-04.jpg)

### STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long

[STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long](https://www.adafruit.com/product/4399)
This 4-wire cable is&nbsp;50mm / 1.9" long and fitted with JST SH female 4-pin connectors on both ends. Compared with the chunkier JST PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/4399)
[Related Guides to the Product](https://learn.adafruit.com/products/4399/guides)
![Angled of of JST SH 4-Pin Cable.](https://cdn-shop.adafruit.com/640x480/4399-00.jpg)

### Part: JST PH 2-Pin Cable
quantity: 2
Male Header 200mm
[JST PH 2-Pin Cable](https://www.adafruit.com/product/3814)

### Part: Mini Push-Pull Solenoid - 5V
quantity: 2
Mini Push-Pull Solenoid - 5V
[Mini Push-Pull Solenoid - 5V](https://www.adafruit.com/product/2776)

### Part: Red Wire
quantity: 1
Silicone Cover Stranded-Core Wire 25ft 26AWG
[Red Wire](https://www.adafruit.com/product/2513)

### Part: Black Wire
quantity: 1
Silicone Cover Stranded-Core Wire - 25ft 26AWG - Black
[Black Wire](https://www.adafruit.com/product/2517)

# Parts from Amazon
### Part: Small Bell
quantity: 1
2 PCS 2.56 Inch Service Bell
[Small Bell](https://www.amazon.com/dp/B0DYDWRYZT?ref=fed_asin_title)

## Hardware

- M2 size screw tap
- 4x M2 x 6mm long screws
- 6x M2.5 x 6mm long machine screws

# Not A Typewriter

## Circuit Diagram

The diagram below provides a general visual reference for wiring of the components once you get to the **Assembly** page. This diagram was created using the software package [Fritzing](http://fritzing.org/download/).

## Adafruit Library for Fritzing

Adafruit uses the Adafruit Fritzing parts library to create circuit diagrams for projects. You can download the library or just grab individual parts. Get the library and parts from [GitHub - Adafruit Fritzing Parts](https://github.com/adafruit/Fritzing-Library/tree/master/parts).

![](https://cdn-learn.adafruit.com/assets/assets/000/137/525/medium800/3d_printing_CircuitDiagram.jpg?1749673486 )

## Wired Connections

- **Solenoid A ground wire** to **0** pin on **Solenoid Driver**
- **Solenoid A voltage wire to +** pin on **Solenoid Driver&nbsp;**
- **Solenoid B ground wire** &nbsp;to&nbsp; **1** &nbsp;pin on **Solenoid Driver**
- **Solenoid B voltage wire to +** pin on **Solenoid Driver**
- **STEMMA QT** on **Solenoid Driver** to **Feather RP2040 USB Host STEMMA QT port**

The **Feather RP2040 USB Host** is powered via USB.

# Not A Typewriter

## CAD Files

![](https://cdn-learn.adafruit.com/assets/assets/000/137/900/medium800thumb/3d_printing_cad.jpg?1750354594 )

## CAD Assembly

The main assembly is available in Fusion 360 and STEP file formats. This includes all of the 3D printed parts and electronic components used in the project. Use the main assembly to create any edits, updates, or modifications.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/137/721/medium640/3d_printing_3d-parts.jpg?1750077587)

## 3D Printed Parts

Individual 3MF files for 3D printing are oriented and ready to print on FDM machines using PLA filament. Original design source may be downloaded using the links below.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/801/medium640/3d_printing_slice-parts.jpg?1750100536)

[Download Source (STEP, F360)](https://cdn-learn.adafruit.com/assets/assets/000/137/809/original/CAD.zip?1750164628)
[Download 3MF.zip](https://cdn-learn.adafruit.com/assets/assets/000/137/810/original/3MF.zip?1750164643)
## Design Source Files

The project assembly was designed in Fusion 360. Once opened in Fusion 360, It can be exported in different formats like STEP, STL and more.

Electronic components like Adafruit's boards, displays, connectors and more can be downloaded from the&nbsp;[Adafruit CAD parts GitHub Repo](https://github.com/adafruit/Adafruit_CAD_Parts/).

![](https://cdn-learn.adafruit.com/assets/assets/000/137/724/medium640/3d_printing_5723_Feather_RP2040_USB_Host.jpg?1750079410)

# Not A Typewriter

## Wiring

## All Parts

Gather up the parts needed for this build.

- Feather RP2040 USB Host
- 8 Channel I2C Solenoid Driver
- 2x 5V mini solenoids
- 2x JST-PH 2-pin cables
- STEMMA QT cable - 50mm long
- 2x short (2") stranded hook-up wires

![](https://cdn-learn.adafruit.com/assets/assets/000/137/675/medium640/3d_printing_parts.jpg?1750076421)

## Wires for Feather

Use the red and black colored spool of wires to create two wires that are approximately 2 inches (50mm) long.

Solder the black wire to the ground pin on the Feather and the red wire to the USB pin.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/676/medium640/3d_printing_power-wires.jpg?1750076435)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/678/medium640/3d_printing_feather-power-gnd-solder.jpg?1750076553)

## Cables for Driver

Cut the wires from the JST-PH cables so they're approximately 2.5 inches long (64mm). Use wire strippers to remove a bit of insulation from the tips of each wire.

Insert the black wire from the first JST cable to pin 0 and red wire to + positive pin.

Insert the black wire from the second JST cable to pin 1 and red wire on + positive pin.

Use a small flat head screwdriver to secure the wires to the screw-block terminals.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/682/medium640/3d_printing_jst-cables.jpg?1750076611)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/683/medium640/3d_printing_driver-jst-install.jpg?1750076621)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/684/medium640/3d_printing_driver-jst-installed.jpg?1750076631)

## Connect Feather to Solenoid Driver

Insert the red wire from the **USB** pin on the Feather to the **positive** terminal on the solenoid driver's power screw block.

Insert the black wire from the **GND** pin on the Feather to the **negative** terminal on the solenoid driver's ground screw block.

Use a small flat head screwdriver to secure the wires to the screw-block terminals.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/685/medium640/3d_printing_feather-driver-connect.jpg?1750076684)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/686/medium640/3d_printing_feather-driver-power.jpg?1750076703)

## Connect STEMMA QT

Plug in the STEMMA QT cable to the STEMMA QT connector on the solenoid driver.

Plug in the other end of the STEMMA QT cable to the STEMMA QT connector on the Feather RP2040 USB Host.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/687/medium640/3d_printing_feather-driver-stemma.jpg?1750076731)

# Not A Typewriter

## Assembly

## Bell Disassembly

Start by pulling out the actuator from the tip of the bell.

Then, pull out the collar from the bell.

Lastly, pull out the base from the bell.

Set the plastic parts aside, they won't be used in this project.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/689/medium640/3d_printing_bell-tip-remove.jpg?1750076850)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/690/medium640/3d_printing_bell-insert-remove.jpg?1750076875)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/692/medium640/3d_printing_bell-base-remove.jpg?1750077052)

## Secure PCBs

Gather up the hardware screws needed to secure the two PCBs to the 3D printed bottom cover.

Place the Feather over the standoffs with the USB A port fitted over the tab. Insert and fasten M2.5 x 6mm long screws to secure the PCB.

Place the solenoid driver over the remaining standoffs with the orientation matching the assembly photo. Insert and fasten M2.5 x 6mm long screws to secure the PCB.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/693/medium640/3d_printing_bottom-screws.jpg?1750077100)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/694/medium640/3d_printing_bottom-feather-screw.jpg?1750077136)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/695/medium640/3d_printing_bottom-driver-screw.jpg?1750077152)

## PCBs Secured

Double check the PCBs are fully secured to the 3D printed bottom cover in the correct orientation.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/699/medium640/3d_printing_bottom-pcb-secured.jpg?1750077204)

## Top Cover Solenoid Mounting Plate

Gather up the 3D printed top cover and bell mounting plate.

Orient the two parts together so the mounting holes are lined up.

Join the two parts together using two M2.5 x 6mm long machine screws.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/696/medium640/3d_printing_top-bellmount-screws.jpg?1750077154)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/697/medium640/3d_printing_top-bellmount-join.jpg?1750077168)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/698/medium640/3d_printing_top-bellmount-fasten.jpg?1750077512)

## Assembled Top Cover

Take a moment to ensure the top cover and bell mounting plate are secured correctly.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/700/medium640/3d_printing_top-bellmount-secured.jpg?1750077243)

## Screw Tap Solenoids

Use a M2 size screw tap to create threads in the mounting holes on the two solenoids.

Be careful not to screw too far in and damage the wire core.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/701/medium640/3d_printing_solenoids-screwtap.jpg?1750077362)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/702/medium640/3d_printing_solenoid-threads.jpg?1750077378)

## Secure Solenoid Bell Ringer

Fit the JST-PH connector from one of the solenoids through the square hole on the top cover assembly.&nbsp;

Orient the mounting holes on the solenoid with the holes on the 3D printed mounting plate.

Insert and fasten two M2 x 6mm long machine screws to secure the solenoid.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/703/medium640/3d_printing_solenoid-top-install.jpg?1750077392)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/704/medium640/3d_printing_solenoid-top-orient.jpg?1750077397)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/705/medium640/3d_printing_solenoid-top-secure.jpg?1750077409)

## Test Solenoid

Ensure the solenoid is secured and mounted to the 3D printed part correctly. Push on the plunger to ensure its pushing in the correct orientation.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/706/medium640/3d_printing_solenoid-top-test.jpg?1750077423)

## Secure Typing Solenoid

Gather up the 3D printed case, M2 screws, and solenoid.

Place the solenoid inside the 3D printed case with the mounting holes lined up.

Insert and fasten two M2 x 6mm long machine screws to secure the solenoid.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/707/medium640/3d_printing_solenoid-base-screws.jpg?1750077432)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/708/medium640/3d_printing_solenoid-base-seure.jpg?1750077448)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/709/medium640/3d_printing_solenoid-base-seured.jpg?1750077456)

## Snap Bottom Cover

Get the bottom cover and the case ready to join together.

Orient the bottom cover with the case so the USB A port from the Feather is lined up with the USB cutout on the case.

Firmly press the two parts to snap fit them together.

Ensure the wires are not pinched or kinked.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/710/medium640/3d_printing_case-bottom.jpg?1750077468)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/711/medium640/3d_printing_case-bottom-join.jpg?1750077479)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/712/medium640/3d_printing_case-bottom-installed.jpg?1750077492)

## Connect Cables

Grab the JST cable from the solenoid inside the case and connect it to the JST cable that is connected to the 0 pin on the solenoid driver.

Connect the remaining JST cable to the solenoid that is secured to the top cover mounting plate.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/713/medium640/3d_printing_solenoid-A-connect.jpg?1750077501)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/714/medium640/3d_printing_solenoid-B-connect.jpg?1750077508)

## Snap Top

Orient the top cover with the case so it matches the assembly photo. Firmly press the top onto the case so the two parts snap fit together.

Ensure none of the wires are pinched or kinked.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/715/medium640/3d_printing_top-base-join.jpg?1750077518)

## Install Bell

Place the bell over the post on the top cover.

Press the 3D printed top pin into the post until its fully seated.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/716/medium640/3d_printing_bell-top-join.jpg?1750077531)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/717/medium640/3d_printing_bell-top-install.jpg?1750077541)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/718/medium640/3d_printing_bell-pin-install.jpg?1750077553)

## Install Keys

Press the 3D printed faux keyboard onto the cavity on the case. Firmly press the edges into the cavity so it snap fits.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/719/medium640/3d_printing_keys-base-join.jpg?1750077564)

## Assembled Case

Take a moment to ensure the case has been assembled correctly.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/720/medium640/3d_printing_keys-base-installed.jpg?1750077577)

## Connect USB Keyboard

Plug in the USB cable from the keyboard to the USB A port on the Feather RP2040.

Plug in the USB-C cable to the USB-C port on the Feather. Then, plug it into your computer or mobile device.

![](https://cdn-learn.adafruit.com/assets/assets/000/137/767/medium640/3d_printing_usb-a-connect.jpg?1750088241)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/768/medium640/3d_printing_usb-c-connect.jpg?1750088250)

![](https://cdn-learn.adafruit.com/assets/assets/000/137/800/medium800/3d_printing_keybo-connected.jpg?1750100305 )

# Not A Typewriter

## Install CircuitPython

[CircuitPython](https://github.com/adafruit/circuitpython) is a derivative of [MicroPython](https://micropython.org) designed to simplify experimentation and education on low-cost microcontrollers. It makes it easier than ever to get prototyping by requiring no upfront desktop software downloads. Simply copy and edit files on the **CIRCUITPY** drive to iterate.

## CircuitPython Quickstart

Follow this step-by-step to quickly get CircuitPython running on your board.

[Download the latest version of CircuitPython for this board via circuitpython.org](https://circuitpython.org/board/adafruit_feather_rp2040_usb_host/)
 **Click the link above to download the latest CircuitPython UF2 file.**

Save it wherever is convenient for you.

![install_circuitpython_on_rp2040_RP2040_UF2_downloaded.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/655/medium640/install_circuitpython_on_rp2040_RP2040_UF2_downloaded.jpg?1618943202)

![](https://cdn-learn.adafruit.com/assets/assets/000/120/454/medium800/hacks_resetBoot.jpg?1682366749)

To enter the bootloader, hold down the **BOOT/**** BOOTSEL button**(highlighted in red above), and while continuing to hold it (don't let go!), press and release the**reset button**(highlighted in red or blue above).&nbsp;**Continue to hold the BOOT/BOOTSEL button until the RPI-RP2 drive appears!**

If the drive does not appear, release all the buttons, and then repeat the process above.

You can also start with your board unplugged from USB, press and hold the BOOTSEL button (highlighted in red above), continue to hold it while plugging it into USB, and wait for the drive to appear before releasing the button.

A lot of people end up using charge-only USB cables and it is very frustrating! **Make sure you have a USB cable you know is good for data sync.**

You will see a new disk drive appear called **RPI-RP2**.

&nbsp;

Drag the **adafruit\_circuitpython\_etc.uf2** file to **RPI-RP2.**

![install_circuitpython_on_rp2040_RP2040_bootloader_drive.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/656/medium640/install_circuitpython_on_rp2040_RP2040_bootloader_drive.jpg?1618943666)

![install_circuitpython_on_rp2040_RP2040_drag_UF2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/657/medium640/install_circuitpython_on_rp2040_RP2040_drag_UF2.jpg?1618943674)

The **RPI-RP2** drive will disappear and a new disk drive called **CIRCUITPY** will appear.

That's it, you're done! :)

![install_circuitpython_on_rp2040_RP2040_CIRCUITPY.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/658/medium640/install_circuitpython_on_rp2040_RP2040_CIRCUITPY.jpg?1618943864)

## Safe Mode

You want to edit your **code.py** or modify the files on your **CIRCUITPY** drive, but find that you can't. Perhaps your board has gotten into a state where **CIRCUITPY** is read-only. You may have turned off the **CIRCUITPY** drive altogether. Whatever the reason, safe mode can help.

Safe mode in CircuitPython does not run any user code on startup, and disables auto-reload. This means a few things. First, safe mode _bypasses any code in_ **boot.py** (where you can set **CIRCUITPY** read-only or turn it off completely). Second, _it does not run the code in_ **code.py**. And finally, _it does not automatically soft-reload when data is written to the_ **CIRCUITPY** _drive_.

Therefore, whatever you may have done to put your board in a non-interactive state, safe mode gives you the opportunity to correct it without losing all of the data on the **CIRCUITPY** drive.

### Entering Safe Mode
To enter safe mode when using CircuitPython, plug in your board or hit reset (highlighted in red above). Immediately after the board starts up or resets, it waits 1000ms. On some boards, the onboard status LED (highlighted in green above) will blink yellow during that time. If you press reset during that 1000ms, the board will start up in safe mode. It can be difficult to react to the yellow LED, so you may want to think of it simply as a slow double click of the reset button. (Remember, a fast double click of reset enters the bootloader.)

### In Safe Mode

If you successfully enter safe mode on CircuitPython, the LED will intermittently blink yellow three times.

If you connect to the serial console, you'll find the following message.

```terminal
Auto-reload is off.
Running in safe mode! Not running saved code.

CircuitPython is in safe mode because you pressed the reset button during boot. Press again to exit safe mode.

Press any key to enter the REPL. Use CTRL-D to reload.
```

You can now edit the contents of the **CIRCUITPY** drive. Remember, _your code will not run until you press the reset button, or unplug and plug in your board, to get out of safe mode._

## Flash Resetting UF2

If your board ever gets into a really _weird_ state and CIRCUITPY doesn't show up as a disk drive after installing CircuitPython, try loading this 'nuke' UF2 to RPI-RP2. which will do a 'deep clean' on your Flash Memory. **You will lose all the files on the board** , but at least you'll be able to revive it! After loading this UF2, follow the steps above to re-install CircuitPython.

[Download flash erasing "nuke" UF2](https://cdn-learn.adafruit.com/assets/assets/000/101/659/original/flash_nuke.uf2?1618945856)
# Not A Typewriter

## Use the USB Host Code

![usb host demo gif](https://cdn-learn.adafruit.com/assets/assets/000/137/818/medium800thumb/3d_printing_useage-host.jpg?1750173938 )

This version of the code lets you plug a USB keyboard into the USB-A port on the Feather RP2040 USB Host. The Feather hosts the keyboard and sends its keystrokes over USB to your computer. The solenoids are triggered whenever you type on the attached keyboard.

Info: There are two code options for this project. This page goes over using the Not A Typewriter as a USB Host.

Once you've finished setting up your Feather RP2040 USB Host with CircuitPython, you can access the code and necessary libraries by downloading the Project Bundle.

To do this, click on the **Download Project Bundle** button in the window below. It will download to your computer as a zipped folder.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Not_A_Typewriter/USB_Host_Not_A_Typewriter/code.py

## Upload the Code and Libraries to the Feather RP2040 USB Host

After downloading the Project Bundle, plug your Feather RP2040 USB Host into the computer's USB port with a known good USB data+power cable. You should see a new flash drive appear in the computer's File Explorer or Finder (depending on your operating system) called **CIRCUITPY**. Unzip the folder and copy the following items to the Feather RP2040 USB Host's **CIRCUITPY** drive.

- **lib** folder
- **code.py**

Your Feather RP2040 USB Host **CIRCUITPY** drive should look like this after copying the **lib** folder&nbsp;and **code.py** file:

![CIRCUITPY drive](https://adafruit.github.io/Adafruit_Learning_System_Guides/Not_A_Typewriter_USB_Host_Not_A_Typewriter.png )

## Use

Plug in your USB keyboard into the USB-A port on the Feather. Then, plug the Feather into your computer. As you type on the keyboard, you'll hear the solenoids trigger. The Feather also sends the keystrokes to your computer from the keyboard.

# Not A Typewriter

## Use the Desktop Python Code

![](https://cdn-learn.adafruit.com/assets/assets/000/137/817/medium800thumb/3d_printing_useage-desktop.jpg?1750173860 )

This version of the code lets you plug in the Not A Typewriter to your computer without having to plug your keyboard into the Feather USB host port. A CPython script runs on your computer sending your keyboard inputs via serial to the attached Feather. The Feather runs CircuitPython code that is listening for those key presses. When a key press is received, the solenoids are triggered.

Info: There are two code options for this project. This page goes over using the Not A Typewriter as a keyboard listener.

Once you've finished setting up your Feather RP2040 USB Host with CircuitPython, you can access the code and necessary libraries by downloading the Project Bundle.

To do this, click on the **Download Project Bundle** button in the window below. It will download to your computer as a zipped folder.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Not_A_Typewriter/Desktop_Not_A_Typewriter/CircuitPython_Serial_Typewriter/code.py

## Upload the Code and Libraries to the Feather RP2040 USB Host

After downloading the Project Bundle, plug your Feather RP2040 USB Host into the computer's USB port with a known good USB data+power cable. You should see a new flash drive appear in the computer's File Explorer or Finder (depending on your operating system) called **CIRCUITPY**. Unzip the folder and copy the following items to the Feather RP2040 USB Host's **CIRCUITPY** drive.

- **lib** folder
- **code.py**
- **boot.py**

Your Feather RP2040 USB Host **CIRCUITPY** drive should look like this after copying the **lib** folder, **boot.py** file and **code.py** file:

![CIRCUITPY drive](https://adafruit.github.io/Adafruit_Learning_System_Guides/Not_A_Typewriter_Desktop_Not_A_Typewriter_CircuitPython_Serial_Typewriter.png )

## CPython Keyboard Sender Code

To run the script you will need a desktop or laptop computer with Python 3 installed.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Not_A_Typewriter/Desktop_Not_A_Typewriter/keyboard_sender.py

## CPython Dependencies

You'll use&nbsp;`pip`&nbsp;to install the Python libraries required to run the script:

```terminal
pip install pyserial
pip install pynput
```

## Use

First, you'll plug the Feather running the CircuitPython code into a USB port on your computer. This mounts the USB CDC port to your computer, which the CPython script needs to access.

To run the CPython script, open a terminal window and navigate to the directory where you have the script. Run the script with:

```terminal
python keyboard_sender.py
```

When you launch the script, you'll be prompted to select the USB CDC port on the Feather. The **boot.py** file on the Feather allows for two COM ports to be opened on the Feather. These ports are numbered consecutively and the CDC port will always be the second one. For example, in the screenshot you can see ports **COM53** and **COM54** are available. The CDC port is **COM54**.

![terminal running the keyboard_sender script](https://cdn-learn.adafruit.com/assets/assets/000/137/812/medium640/3d_printing_Screenshot_2025-06-17_094555.png?1750168059)

As you type, you'll hear the solenoids begin triggering. In the terminal where you launched the script, you'll see the keycodes printed out as you type.

![animated gif of the serial monitor for the feather and the desktop terminal showing the keycodes going by](https://cdn-learn.adafruit.com/assets/assets/000/137/814/medium800thumb/3d_printing_cpythonGif.jpg?1750168870 )


## Featured Products

### Adafruit Feather RP2040 with USB Type A Host

[Adafruit Feather RP2040 with USB Type A Host](https://www.adafruit.com/product/5723)
You're probably really used to microcontroller boards with USB, but what about a dev board with two? Two is more than one, so that makes it twice as good! And the&nbsp; **Adafruit Feather RP2040 with USB Host** is **&nbsp;** definitely double-the-fun of our other Feather...

In Stock
[Buy Now](https://www.adafruit.com/product/5723)
[Related Guides to the Product](https://learn.adafruit.com/products/5723/guides)
### Adafruit I2C to 8 Channel Solenoid Driver

[Adafruit I2C to 8 Channel Solenoid Driver](https://www.adafruit.com/product/6318)
Solenoids are a little like cats: if your project has one solenoid you'll probably stick with just one and in such cases our [single MOSFET driver will work well](https://www.adafruit.com/product/5648). But if you have more than one solenoid, it's going to be anywhere from 2...

In Stock
[Buy Now](https://www.adafruit.com/product/6318)
[Related Guides to the Product](https://learn.adafruit.com/products/6318/guides)
### Mini Push-Pull Solenoid - 5V

[Mini Push-Pull Solenoid - 5V](https://www.adafruit.com/product/2776)
Solenoids are basically electromagnets: they are made of a coil of copper wire with an armature (a slug of metal) in the middle. When the coil is energized, the slug is pulled into the center of the coil. This makes the solenoid able to pull (from one end) or push (from the other).

This...

In Stock
[Buy Now](https://www.adafruit.com/product/2776)
[Related Guides to the Product](https://learn.adafruit.com/products/2776/guides)
### Blue USB Type C to USB A Cable with 540 Degree Rotating End

[Blue USB Type C to USB A Cable with 540 Degree Rotating End](https://www.adafruit.com/product/6278)
Some days we're feeling extra fancy here at the 'fruit warehouse, and we have a big soft spot for colorful&nbsp;cables that make our projects look like Transformers. Like, peep [this fully reversible pink/purple Blinka-inspired cable](https://www.adafruit.com/product/4111)....

Out of Stock
[Buy Now](https://www.adafruit.com/product/6278)
[Related Guides to the Product](https://learn.adafruit.com/products/6278/guides)
### Mini Chiclet Keyboard - USB Wired - Black

[Mini Chiclet Keyboard - USB Wired - Black](https://www.adafruit.com/product/1736)
Add a good quality, slim keyboard to your&nbsp;Raspberry Pi, Beagle Bone Black, or other single-board-computer with this sleek black chiclet keyboard. It's a full QWERTY keyboard with a USB cable and is compatible with all operating systems. We tried many keyboards to find one that felt...

In Stock
[Buy Now](https://www.adafruit.com/product/1736)
[Related Guides to the Product](https://learn.adafruit.com/products/1736/guides)
### STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long

[STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long](https://www.adafruit.com/product/4399)
This 4-wire cable is&nbsp;50mm / 1.9" long and fitted with JST SH female 4-pin connectors on both ends. Compared with the chunkier JST PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/4399)
[Related Guides to the Product](https://learn.adafruit.com/products/4399/guides)
### JST PH 2-Pin Cable – Male Header 200mm

[JST PH 2-Pin Cable – Male Header 200mm](https://www.adafruit.com/product/3814)
For a really long time we assumed that the JST PH didn't have a free-hanging male header version. But then we found this **JST-PH 2-pin Male Cable,** and we were like,&nbsp;_this is perfect!_ It's not a genuine JST connector, but it's 100%...

In Stock
[Buy Now](https://www.adafruit.com/product/3814)
[Related Guides to the Product](https://learn.adafruit.com/products/3814/guides)

## Related Guides

- [Adafruit Feather RP2040 with USB Type A Host](https://learn.adafruit.com/adafruit-feather-rp2040-with-usb-type-a-host.md)
- [Adafruit I2C to 8 Channel Solenoid Driver](https://learn.adafruit.com/adafruit-i2c-to-8-channel-solenoid-driver.md)
- [Using a Keyboard with USB Host](https://learn.adafruit.com/using-a-keyboard-with-usb-host.md)
- [CircuitPython Text Editor On The Go](https://learn.adafruit.com/circuitpython-text-editor-on-the-go.md)
- [Feather Guitar Hero Adapter](https://learn.adafruit.com/feather-guitar-hero-adapter.md)
- [DIY Turbo Button Controller - HID Remapper](https://learn.adafruit.com/diy-turbo-button-controller-hid-remapper.md)
- [USB Game Controller with SNES-like Layout](https://learn.adafruit.com/usb-game-controller-with-snes-like-layout.md)
- [RP2040 RunCPM Emulator with USB Keyboard & HDMI screen](https://learn.adafruit.com/rp2040-runcpm-emulator-with-usb-keyboard-hdmi-screen.md)
- [Solderless Robot Toy Xylophone](https://learn.adafruit.com/solderless-robot-toy-xylophone.md)
- [Case for Feather RP2040 USB Host](https://learn.adafruit.com/case-for-feather-rp2040-usb-host.md)
- [CircuitPython USB VID/PID Reporter](https://learn.adafruit.com/circuitpython-usb-vid-pid-reporter.md)
- [Using a Mouse with USB Host](https://learn.adafruit.com/using-a-mouse-with-usb-host.md)
- [USB MIDI Host Messenger](https://learn.adafruit.com/usb-midi-host-messenger.md)
- [Cyber Cat MIDI Keyboard](https://learn.adafruit.com/midi-cyber-cat-keyboard.md)
- [Neo Trinkey Zoom Shortcuts](https://learn.adafruit.com/neo-trinkey-zoom-shortcuts.md)
