# Source: https://learn.adafruit.com/usb-next-keyboard-with-arduino-micro/wiring-case.md

# USB NeXT Keyboard with an Arduino Micro

## Wiring & Case

The wiring for this project is actually really easy - we used an Arduino micro to keep the size small. We just have to power the keyboard and connect the two data pins.   
  
Watch out here, because the DIN wire colors do not correspond to classical wire coloring!

1. **Brown - VCC +5**
2. **Black - data to KBD**
3. Green - data from KBD
4. Yellow - power SW **(unused)**  
5. **Red - Ground**

  
Solder the Brown wire to the +5V on the micro, the Red wire goes to the Ground pin. Then connect The green and black wires to two digital pins (I used 2 and 3)  
![](https://cdn-learn.adafruit.com/assets/assets/000/002/903/medium800/microcontrollers_soldering.jpg?1396788521)

Using this mint tin made for a nice case. A little dremel work, and the DIN connector would fit nicely at one end, the wiring inside, and the microUSB connector on the other end.

![](https://cdn-learn.adafruit.com/assets/assets/000/002/904/medium800/microcontrollers_dremel.jpg?1396788541)

![](https://cdn-learn.adafruit.com/assets/assets/000/002/905/medium800/microcontrollers_fit.jpg?1396788553)

![](https://cdn-learn.adafruit.com/assets/assets/000/002/907/medium800/microcontrollers_plug.jpg?1396788586)

Use two small screws to attach the DIN connector. After the header pins have been cut off the Micro, it will fit nicely in the tin, be sure to use some thick foam tape to both hold down the board and keep the pins from shorting. A slot in the tin makes it easy to plug in a micro USB cable

![](https://cdn-learn.adafruit.com/assets/assets/000/002/908/medium800/microcontrollers_micro.jpg?1396788592)

![](https://cdn-learn.adafruit.com/assets/assets/000/002/906/medium800/microcontrollers_closed.jpg?1396788578)

- [Previous Page](https://learn.adafruit.com/usb-next-keyboard-with-arduino-micro/research.md)
- [Next Page](https://learn.adafruit.com/usb-next-keyboard-with-arduino-micro/code.md)

## Featured Products

### Arduino Micro without Headers - 5V 16MHz ATmega32u4 - Assembled

[Arduino Micro without Headers - 5V 16MHz ATmega32u4 - Assembled](https://www.adafruit.com/product/1315)
Squee! It's the cutest, tiniest little Arduino yet! The Arduino Micro packs all of the power of the Arduino Leonardo in a 1.9" x 0.7" (48mm x 18mm) size. Although it may look like a stick of gum, its actually a USB-native 8-bit microcontroller, with 32K of flash, and 2.5K of RAM....

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1315)
[Related Guides to the Product](https://learn.adafruit.com/products/1315/guides)
### Arduino Micro with Headers - 5V 16MHz - (ATmega32u4 - assembled)

[Arduino Micro with Headers - 5V 16MHz - (ATmega32u4 - assembled)](https://www.adafruit.com/product/1086)
_Squee_! It's the cutest, tiniest little Arduino yet! The Arduino Micro packs all of the power of the Arduino Leonardo in a 1.9" x 0.7" (48mm x 18mm) size. Although it may look like a stick of gum, its actually a USB-native 8-bit microcontroller, with 32K of flash, and...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1086)
[Related Guides to the Product](https://learn.adafruit.com/products/1086/guides)
### Altoids Gum sized tin

[Altoids Gum sized tin](https://www.adafruit.com/product/16)
Ever since Altoids discontinued the Gum version, its been hard to get tins. So we went and got a whole mess of them custom made! These tins are exactly the same shape and size as the old Altoids gum tins but they are blank and we got the bottom flattened instead of rounded (so it fits things...

In Stock
[Buy Now](https://www.adafruit.com/product/16)
[Related Guides to the Product](https://learn.adafruit.com/products/16/guides)
### USB cable - USB A to Micro-B

[USB cable - USB A to Micro-B](https://www.adafruit.com/product/592)
This here is your standard A to micro-B USB cable, for USB 1.1 or 2.0. Perfect for connecting a PC to your Metro, Feather, Raspberry Pi or other dev-board or microcontroller

Approximately 3 feet / 1 meter long

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

## Related Guides

- [Adafruit PCA9546 4-Channel I2C Multiplexer](https://learn.adafruit.com/adafruit-pca9546-4-channel-i2c-multiplexer.md)
- [Blinking an LED with the Zephyr RTOS](https://learn.adafruit.com/blinking-led-with-zephyr-rtos.md)
- [Qualia S3 Fireplace](https://learn.adafruit.com/qualia-s3-fireplace.md)
- [Arduino GPS Clock](https://learn.adafruit.com/arduino-clock.md)
- [Adafruit 4-Channel ADC Breakouts](https://learn.adafruit.com/adafruit-4-channel-adc-breakouts.md)
- [Reverse Geocache Box](https://learn.adafruit.com/reverse-geocache-engagement-box.md)
- [ESPHole Ad Blocker](https://learn.adafruit.com/esphole-ad-blocker.md)
- [Adafruit QT Py and NeoPixel LEDs](https://learn.adafruit.com/qt-py-and-neopixel-leds.md)
- [The Pixif](https://learn.adafruit.com/the-pixif.md)
- [Quickstart IoT - Raspberry Pi Pico RP2040 with WiFi ](https://learn.adafruit.com/quickstart-rp2040-pico-with-wifi-and-circuitpython.md)
- [Atmega32u4 Breakout](https://learn.adafruit.com/atmega32u4-breakout.md)
- [Introducing Adafruit ItsyBitsy M4](https://learn.adafruit.com/introducing-adafruit-itsybitsy-m4.md)
- [Adafruit Metro M7 with microSD](https://learn.adafruit.com/adafruit-metro-m7-microsd.md)
- [Adafruit Infrared IR Remote Receiver](https://learn.adafruit.com/adafruit-infrared-ir-remote-receiver.md)
- [Adafruit Feather M4 CAN Express](https://learn.adafruit.com/adafruit-feather-m4-can-express.md)