overhead of a square cardboard switch with an embedded controller and the play and pause icons pasted on the button.

Cardboard Enabled Switch

This project uses a low-cost Trinket M0 board, Triwall cardboard, and foil tape to create an enabled switch for computer or mobile device interaction. The code is built using the Maker MakeCode editor which supports easy drag and drop coding and flashing.

**This build is geared towards the nontechnical/ novice user and uses the MakeCode block based programming language.

Please note, this device should not be used to activate life critical equipment and is geared toward improving independence and quality of life.

Materials List

Qty

Item

1

Adafruit Trinket MO

1

Triwall piece 140mm2

1

Triwall piece 75mm2 

1

Micro USB Cable (data)

1

Aluminum Tape or Foil

1

Bubble Envelope

Equipment List

Soldering Iron and solder

Wire- Unthreaded if available

Wirecutter and stripper

Utility Knife

Never soldered before? Check out this beginner-friendly how-to video from Adafruit.

Step #1 Mark Out the Segment for the Button and Controller

On the 140mm2 Triwall piece pencil out the following areas and locations:

Trinket holder: 20mm x 30 mm

Button holder: 80mm x 80mm

Step #2: Remove layers of cardboard to fit the board and button

Using the utility knife, cut through one layer in the Trinket holder area and remove the layer of cardboard.

Cut through two layers in the button holder area and remove the layers of cardboard.

Step #3: Solder the wires to the board

Cut two wires of differing colors if available to about 80mm in length and strip about 10mm off both ends.

Solder one wire to the ground (GND) pin.

Solder the other wire to pin 0.

Step #4: Thread the wires through and tape down the ground wire

Place the board into the designated area and thread the wires through. You may use an awl to enlarge the passageway. Apply aluminum tape or foil over the wire connected to the GND pin.

Step #5: Thread the pin wire to the button and tape it down

Adhere the wire connected to pin 0 to the button triwall piece and apply aluminum tape or foil over it.

❗️ You may want to expose more of the wire during this step, in the event that your switch does not activate as desired.

Apply a layer of bubble wrap envelop and adhere over the foil layer. You may adjust the opening as needed. The switch is activated when both foil pieces come in contact with each other.

Step #8: Navigate to the MakeCode Editor and download the file

MakeCode Trinket_Keycode

Click on the “Edit” button in the new tab.

Click on the Download button. A .uf2 file will be available in your default downloads location

Step #9: Drag the code to the Trinket Boot Drive

Connect the board to your computer using the USB cable. Ensure the cable supports data transfer and is not charge only!

Navigate to your File Explorer or Finder and drag the downloaded .uf2 file into the TRINKETBOOT drive.

If you do not see the BOOT drive, press the reset button which should then put the board in bootloader mode.


Step #10: Test it Out!

Connect the switch to your desired computer via the USB switch. After a second or so, try pressing the switch in a text editor.

Or test it on this website: Enabled Switch Tester

The switch may also be used for Switch Access on MacOS. Please note, that Apple devices will not read letters or numbers for this purpose. Be sure to use function keys only (space, tab, enter, arrow keys, etc.).

Integration on iOS is also possible. See instructions below. 

Modifications:

To change the keypress being sent:

To change the key repeat rate:

iOS Integration

You may use the switch to control an iOS device using Single Switch Scanning via Accessibility settings.

You will need to connect the USB cable to the iOS device using a Lightning to USB Camera Adapter. The switch was not recognized when using a 3rd party dongle however this had not been extensively tested.

The switch was successfully run on an iPhone xR and an older iPad Air 2. It was unsuccessful on iPad Pro 10.5.

Next Steps:

Last edited on: Aug 28, 2021