# Trinket

### Trinket USB Accellerometer Keyboard

This project combines an Adafruit Trinket with a i2c accelerometer to create a USB seismograph. The output is sent as the keys A to Z to make it easy to integrate with environments like Scratch.

### Assembly

The header pins need to be cut to the right length for the Trinket. The breadboard can be used as a jig to hold the pins straight on the Trinket. For the accelerometer it helps to put another header underneath to hold it level.

We held a soldering party to put together forty kits. So many header pins!

### Wiring

The two components can be connected on the breadboard or in the air using female-female jumper wires. Don't connect them while the Trinket is powered to avoid accidental shorts or other problems! The pinout is:

Function Trinket MMA8451 Color
Power USB VIN Red
Ground GND GND Black
Data #0 SDA Yellow
Clock #2 SCL Green

### Code

The code flashed on the devices is in github.com/osresearch/trinket in the imu/ directory. If you want to change the update rate it is controlled by the last_keystroke timeout in loop().