# Ultrasonic Ruler

## Overview

http://youtu.be/SDO2mXPhJWU

## Beast Rabban's Lost Pistol

In this guide, we're building a Dune inspired movie replica using 3D Printing and electronics. Beast Rabbon's pistol is a unqiue harkonnen weapon that was never seen in&nbsp;David Lynch's 1984's Dune. There are only&nbsp;two images of the pistol on the net and currently isn't anyway to get one.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/019/356/medium800/proximity_dune-movie-prop-hero.jpg?1409690066)

## 3D Printing Movie Replicas

This project combines the original pistol with functional&nbsp;features. A Trinket micro-controller reads an EZ4 rangefinder and writes the distance in centimeters onto a 14-segment LED display.&nbsp;

## Prerequisite Guides

Be sure to walk through the following guides to get&nbsp;yourself&nbsp;familiar with the Trinket micro-controller, LED Backpacks, and distance sensor.

- [Introducing Trinket](../../../introducing-trinket)
- [Adafruit LED Backpacks](../../../adafruit-led-backpack/0-54-alphanumeric)
- [Trinket Ultrasonic Rangefinder](../../../trinket-ultrasonic-rangefinder)
- [Collin's Lab: Soldering](../../../collins-lab-soldering)

![](https://cdn-learn.adafruit.com/assets/assets/000/019/309/medium800/proximity_circuit-parts-sm.jpg?1409681011)

## Parts&nbsp;

- [MaxBotix LV-EZ Ultrasonic rangefinder](https://www.adafruit.com/product/982)
- [Trinket Micro-Controller](https://www.adafruit.com/product/1501)&nbsp;(3V or 5V)
- [Quad Alphanumberic Display](https://www.adafruit.com/product/1911)&nbsp;- 0.54" 14-segment LED
- [3 x&nbsp;AAA battery holder](https://www.adafruit.com/product/727)
- [Slide Switch](https://www.adafruit.com/products/805)

## Tools & Supplies

- [3D Printer](https://www.adafruit.com/search?q=3D+Printer&b=1)&nbsp;+&nbsp;[PLA Filament](https://www.adafruit.com/search?q=PLA+Filament&b=1)
- [Soldering Iron](https://www.adafruit.com/search?q=Soldering+Iron&b=1)&nbsp;+&nbsp;[Solder](https://www.adafruit.com/search?q=Solder+rosin&b=1)
- [JST Battery extension cable](https://www.adafruit.com/products/1131)
- [30AWG Wire Wrap](https://www.adafruit.com/search?q=silicone+cover+30&b=1)
- [Heat Shrink Tubbing](https://www.adafruit.com/products/1649)
- [Wire Strippers](https://www.adafruit.com/product/527)
- [Diagonal&nbsp;Wire Cutters](https://www.adafruit.com/product/152)
- [Panavise Jr.](https://www.adafruit.com/products/151)
- [Third Helping Hand](https://www.adafruit.com/product/291)

# Ultrasonic Ruler

## Circuit Diagram

![](https://cdn-learn.adafruit.com/assets/assets/000/019/310/medium800/proximity_circuit-diagram.png?1409681061)

## Ultrasonic + Trinket

Follow the circuit diagram above for referencing how to wire up the circuit. Use a breadboard to prototype this circuit.&nbsp;

## Programming Trinket

You will need to download and install special libraries in order to get the Trinket to work with the Adurino IDE. Check out the link below for setting that up.

[Configure Trinket for Arduino](https://learn.adafruit.com/introducing-trinket/setting-up-with-arduino-ide)
# Ultrasonic Ruler

## Code

## Ultrasonic Distance Sensor for Tirnket and Quad Alphanumeric LED Display

Copy and paste the following code into a new sketch in the Arduino IDE. Select the Adafruit Trinket 8MHz in the board section under the Tools menu. Make sure the Programmer section is set to USBTinyISP. Once those are confirmed, plug in the Trinket via USB to your computer and hit upload while the trinket is blinking red.

```auto
#include &lt;TinyWireM.h&gt;
//#include &lt;avr/power.h&gt;
#include "Adafruit_LEDBackpack.h"
#include "Adafruit_GFX.h"

#define EZ1pin 1               // Trinket GPIO #1   

Adafruit_AlphaNum4 alpha4 = Adafruit_AlphaNum4(); 
char printMe[3];
String str;
int8_t arraysize = 9; // quantity of values to find the median (sample size). Needs to be an odd number
uint16_t rangevalue[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0};
uint16_t modE;        // calculated median distance

void setup() {
  pinMode(EZ1pin, INPUT); // Sey ultrasonic sensor pin as input
  
  //if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
  alpha4.begin(0x70);  // pass in the address
  alpha4.writeDisplay();  // clear display
}

void loop() {
  int16_t pulse;  // number of pulses from sensor
  int i=0;
  
  while( i &lt; arraysize )
  {								    
    pulse = pulseIn(EZ1pin, HIGH);  // read in time for pin to transition
    rangevalue[i]=pulse/58;         // pulses to centimeters (use 147 for inches)
    if( rangevalue[i] &lt; 645 &amp;&amp; rangevalue[i] &gt;= 15 ) i++;  // ensure no values out of range
    delay(10);                      // wait between samples
  }
  isort(rangevalue,arraysize);        // sort samples
  modE = mode(rangevalue,arraysize);  // get median
	str=String(modE);
	str.toCharArray(printMe,3);


    alpha4.writeDigitAscii(0, printMe[0]);
    alpha4.writeDigitAscii(1, printMe[1]);
    alpha4.writeDigitAscii(2, 'C');		// write to LCD
    alpha4.writeDigitAscii(3, 'M');
    alpha4.writeDisplay();
  delay(500);                        	// Read every half second
}

// Sorting function (Author: Bill Gentles, Nov. 12, 2010)
void isort(uint16_t *a, int8_t n){
  for (int i = 1; i &lt; n; ++i)  {
    uint16_t j = a[i];
    int k;
    for (k = i - 1; (k &gt;= 0) &amp;&amp; (j &lt; a[k]); k--) {
      a[k + 1] = a[k];
    }
    a[k + 1] = j;
  }
}

// Mode function, returning the mode or median.
uint16_t mode(uint16_t *x,int n){
  int i = 0;
  int count = 0;
  int maxCount = 0;
  uint16_t mode = 0;
  int bimodal;
  int prevCount = 0;
  while(i&lt;(n-1)){
    prevCount=count;
    count=0;
    while( x[i]==x[i+1] ) {
      count++;
      i++;
    }
    if( count &gt; prevCount &amp; count &gt; maxCount) {
      mode=x[i];
      maxCount=count;
      bimodal=0;
    }
    if( count == 0 ) {
      i++;
    }
    if( count == maxCount ) {      //If the dataset has 2 or more modes.
      bimodal=1;
    }
    if( mode==0 || bimodal==1 ) {  // Return the median if there is no mode.
      mode=x[(n/2)];
    }
    return mode;
  }
}
```

# Ultrasonic Ruler

## 3D Printing

![](https://cdn-learn.adafruit.com/assets/assets/000/019/311/medium800/proximity_3d-parts-sm.jpg?1409681099)

[Download STLs](http://www.thingiverse.com/thing:456078)
## PLA Filament

We recommend printing the parts in PLA filament. Follow our slice settings as&nbsp;a reference point. Settings will vary from printer to printer, so you'll need to adjust your printers&nbsp;settings accordingly. Each part is optimized to print with no support material and saved in the best oriention to print.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/357/medium800/proximity_cad-hero-parts.jpg?1409690136)

[Edit/Modify Design](http://www.123dapp.com/project/Ultrasonic%20Ruler/2703119)
## Prop&nbsp;Details

We recommend printing the **dhp-grip-bottom.stl** and **dhp-grip-top.stl** parts together in a set. The **dhp-dot.stl** pieces can also be printed in one set to speed up the process. Most slicing software can allow you dubplicate STLs. This project uses 12 dots, 6 on each side.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/354/medium800/proximity_FM1A0468.jpg?1409688329)

## Finish Part Surface

We added a light coat of silver spray paint to the parts to give it a metal look. Using sand paper and a brass sponage, we smoothed out&nbsp;the surface and added abasion &nbsp;to the parts giving it a worn and aged textured.

# Ultrasonic Ruler

## Assembly

## Add JST to Trinket

First step is to get a JST connector onto the Trinket so we can easily remove any JST compatible power source.

We'll grab the JST battery exnsion cable and measure the length like in the photo. Cut and strip the wires from the JST cable.

Tin the postive and negative pads on the bottom of the Trinket and solder the red wire from the JST cable to the postive pad, and the black wire to the negative pad.

![proximity_trinket_tin.jpg](https://cdn-learn.adafruit.com/assets/assets/000/019/316/medium640/proximity_trinket_tin.jpg?1409683144)

![proximity_trinket_wire_measure.jpg](https://cdn-learn.adafruit.com/assets/assets/000/019/317/medium640/proximity_trinket_wire_measure.jpg?1409683185)

![proximity_female_con_trinket.jpg](https://cdn-learn.adafruit.com/assets/assets/000/019/318/medium640/proximity_female_con_trinket.jpg?1409683242)

![proximity_trinket_power_soldering.jpg](https://cdn-learn.adafruit.com/assets/assets/000/019/319/medium640/proximity_trinket_power_soldering.jpg?1409683287)

![](https://cdn-learn.adafruit.com/assets/assets/000/019/314/medium800/proximity_trinket_power.jpg?1409683005)

## Trinket JST Connector

Adding a JST female connector to the Trinket micro-controller makes it easy to swap out capatible power sources. Most of our battery holders, rechargable lithium polymer and lithium ion batteries use&nbsp;JST connectors.

Info: 

## Assemble Quad Alphanumeric Display

The quad alphanumeric display comes in a kit that requires assembly. Add the LED matrixes to the driver with the dots lined up for proper orientation. Bend the terminals on the far end aparts so it keeps the LED matrix in place while you solder. Secure the LED backpack to a panavise and solder the 18 pins.&nbsp;Use a diagonal cutters to remove the excess leads.

![proximity_screen-driver-attaching.jpg](https://cdn-learn.adafruit.com/assets/assets/000/019/324/medium640/proximity_screen-driver-attaching.jpg?1409684294)

![proximity_screen_driver_pins.jpg](https://cdn-learn.adafruit.com/assets/assets/000/019/325/medium640/proximity_screen_driver_pins.jpg?1409684357)

![proximity_screen_driver_solder.jpg](https://cdn-learn.adafruit.com/assets/assets/000/019/326/medium640/proximity_screen_driver_solder.jpg?1409684444)

![proximity_screen_driver_clip.jpg](https://cdn-learn.adafruit.com/assets/assets/000/019/327/medium640/proximity_screen_driver_clip.jpg?1409684484)

![](https://cdn-learn.adafruit.com/assets/assets/000/019/328/medium800/proximity_screen_driver.jpg?1409684567)

## Assembled 14-Segment Quad Alphanumeric Display

Double check all of the pins have been soldered.&nbsp;

## Solder Wires to LED Matrix

Tin the five pins on the top of the LED Matrix. Solder one 30AWG wire to each pin. Use either a long strand of wire (about 20meters long) or the whole&nbsp;wire spool.&nbsp;

![proximity_screen_tin.jpg](https://cdn-learn.adafruit.com/assets/assets/000/019/329/medium640/proximity_screen_tin.jpg?1409684715)

![proximity_screen_soldering.jpg](https://cdn-learn.adafruit.com/assets/assets/000/019/330/medium640/proximity_screen_soldering.jpg?1409684795)

![](https://cdn-learn.adafruit.com/assets/assets/000/019/333/medium800/proximity_screen_soldered.jpg?1409684991)

## LED Matrix Connections

Try using a different color for each wire&nbsp;so that you can easily tell them apart.

## Measure LED Matrix Connections

Position the LED matrix over the parts and measure the length required to make a connection. Cut the wires and add a piece of heat shrink tubing to bundle the wires. Insert the bundle wire through the opening in the **dhp-led.stl** part.

![proximity_measure_screeen_wires.jpg](https://cdn-learn.adafruit.com/assets/assets/000/019/334/medium640/proximity_measure_screeen_wires.jpg?1409685087)

![proximity_screen_cover_wire.jpg](https://cdn-learn.adafruit.com/assets/assets/000/019/335/medium640/proximity_screen_cover_wire.jpg?1409685206)

![proximity_screen_cover_wiring.jpg](https://cdn-learn.adafruit.com/assets/assets/000/019/336/medium640/proximity_screen_cover_wiring.jpg?1409685290)

## Wire EZ Rangefinder

Solder a 30AWG wire to the&nbsp; **GND,**  **5V** and **PWM** pin on the EZ distance rangefinder. If you solder to the&nbsp;leads&nbsp;of the header, be sure to add a piece of heat shrink tubing to secure the connection.

Position the sensor over the parts and measure the length of wire required for connecting to the Trinket.&nbsp;

Gently insert the distance sensor into the **dhp-barrel.stl** part with the black plastic part going in first.

![proximity_measrue_wires.jpg](https://cdn-learn.adafruit.com/assets/assets/000/019/341/medium640/proximity_measrue_wires.jpg?1409686019)

![proximity_sensor_mounted.jpg](https://cdn-learn.adafruit.com/assets/assets/000/019/342/medium640/proximity_sensor_mounted.jpg?1409686062)

![proximity_sensor-soldered.jpg](https://cdn-learn.adafruit.com/assets/assets/000/019/575/medium640/proximity_sensor-soldered.jpg?1414174677)

![](https://cdn-learn.adafruit.com/assets/assets/000/019/487/medium800/proximity_slide-switch.jpg?1409795896)

## Slide Switch Adapter

Shorten a JST extension cable to about 10mm long by cutting the positive and negative cables with wire cutters. Use wire stripers to strip the ends of the positive and negative wires. Apply a bit of rosin to the stripped ends and tin the tips of the wires. Add a piece of shrink tubing to the positive wire and solder them together by holding them in place with a third-helping-hand.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/343/medium800/proximity_circuits.jpg?1409686146)

## Wired Components&nbsp;

Yay! All of the components are wired and ready for&nbsp;installing to the enclosure. &nbsp;The trinket and LED matrix&nbsp;will be secured to the printed parts with machine screws. The next page will walk you through the build process.

# Ultrasonic Ruler

## Build

![](https://cdn-learn.adafruit.com/assets/assets/000/019/344/medium800/proximity_screen_cover_wired.jpg?1409686259)

## Insert LED Matrix to Enclosure

Insert the wiring from the LED Matrix through the opening in the **dhp-led.stl** part. Fit&nbsp;the LED Matrix into the **dhp-led.stl** part with the triangle part lined up with the top of the LED (The noticable dots indicate the LED's orientation).

![](https://cdn-learn.adafruit.com/assets/assets/000/019/346/medium800/proximity_sensor_mount1.jpg?1409686338)

## Install Sensor to Barrel

Place the sensor over the barrel and line up the orientation. Carefully insert the distance sensor into the **dhp-barrel.stl** part with the plastic part going in first.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/019/347/medium800/proximity_trinket_mounted.jpg?1409686382)

## Add Trinket&nbsp;to Enclosure

Insert the Trinket into the **dhp-box-bottom.stl** part with the USB port facing the port&nbsp;opening. Line up the two mounting holes on the trinket with the holes on&nbsp;the part.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/345/medium800/proximity_mount_trinket.jpg?1409686297)

## Mount Trinket to Enclosure

Add two #4-40 flat phillips screws to the **dhp-box-bottom.stl** part and fasten it together while holding the Trinket down to the part.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/452/medium800/proximity_connect-switch-to-trinket.jpg?1409773945)

## Connect Switch to Trinket

Insert the male JST connector from the slide switch adapter to the female JST conncetor on the Trinket.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/352/medium800/proximity_trigger_screws.jpg?1409686668)

## Add Screws to Trigger

Fasten two #4-40 flat philips screws into the&nbsp;holes with stand-offs. These need to be inserted so that the heads of the screws are on the opposite end of the stand off.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/455/medium800/proximity_add-switch-to-box.jpg?1409774761)

## Add Switch to Enclosure

Insert the Slide Switch adapter into the **dhp-bottom-box.stl** part.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/453/medium800/proximity_add-bat-to-switch.jpg?1409774319)

## Connect Battery to Switch

Insert the male JST connector to the female JST connector on the slide switch adapter.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/454/medium800/proximity_add-bat-to-box.jpg?1409774447)

## Add Battery to Enclosure

Insert the 3 x AAA battery holder in the **dhp-bottom-box.stl** &nbsp;and gently position the cables in between the sides.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/457/medium800/proximity_add-barrel-to-box.jpg?1409775001)

## Add Barrel to Enclosure

Insert the **dhp-barrel.stl** part onto&nbsp;the **dph-bottom-box.stl** part with the bottom edge fitting into the opening on the enclosure.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/458/medium800/proximity_trigger-placement.jpg?1409775189)

## Position LED Matrix Wiring

Place the wiring from the LED Matrix through the opening near the top of the battery like in the photo. This wire needs to route through the opening near the triggne and out the handle.

## Install Trigger

Place the trigger on the enclosure with the heads of the scews resting inside&nbsp;the indents of walls.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/459/medium800/proximity_add-top-to-bottom-box.jpg?1409775420)

## Add Cover to&nbsp;Enclosure

Place the **dhp-top-box.stl** part over the **dhp-bottom-box.stl** part and make sure&nbsp;wires are not covering&nbsp;the standoffs.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/460/medium800/proximity_box-screw-bottom.jpg?1409775599)

## Secure Enclosure

Add #4-40 flat phillips screw to the three mounting holes. Hold down the top and bottom parts together so both&nbsp;pieces are flush when they're secured together.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/461/medium800/proximity_add-bottom-handle-to-box.jpg?1409775771)

## Add Handle to Enclosure

Position the **dhp-bottom-handle.stl** part to the battery+trinket enclosure like shown in the photo.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/019/348/medium800/proximity_handle_wires.jpg?1409686505)

## Adjust LED Matrix Wiring

Press down the excess wiring and bend it behind the&nbsp;standoff in the handle.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/462/medium800/proximity_join-handles.jpg?1409775884)

## Add Cover to Handle

Place the **dhp-top-handle.stl** part over the **dhp-bottom-handle.stl** part and line up the mounting holes&nbsp;and standoffs.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/350/medium800/proximity_side_trinket_screw.jpg?1409686591)

## Check Trigger Placement

Ensure the two screws in trigger are properly positioned&nbsp;inside the enclosure.

## Secure Handle

Join the top and bottom handle parts together with machine screws. Fasten three #4-40 flat philips screws while tightly holding the two parts together.

![proximity_top-handle-screw.jpg](https://cdn-learn.adafruit.com/assets/assets/000/019/463/medium640/proximity_top-handle-screw.jpg?1409776328)

![proximity_butt-handle-screw.jpg](https://cdn-learn.adafruit.com/assets/assets/000/019/464/medium640/proximity_butt-handle-screw.jpg?1409776363)

![proximity_bottom-handle-screw.jpg](https://cdn-learn.adafruit.com/assets/assets/000/019/465/medium640/proximity_bottom-handle-screw.jpg?1409776398)

![proximity_trigger-top.jpg](https://cdn-learn.adafruit.com/assets/assets/000/019/466/medium640/proximity_trigger-top.jpg?1409776443)

![](https://cdn-learn.adafruit.com/assets/assets/000/019/351/medium800/proximity_btm_trigger_screws.jpg?1409686627)

## Secure Bottom Handle to Enclosure

Line up the mount holes on the bottom of the handle and add two #4-40 flat phillips screws to the bottom. Fasten these screws tightly to join the bottom&nbsp;of the handle to the enclosure.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/468/medium800/proximity_top-handle-box.jpg?1409777043)

## Secure Top Handle to Enclosure

Line up the holes on the top of the handle and add two #4-40 flat phillips screws to the top. Fasten these screws tightly to join the top of the handle to the enclosure.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/349/medium800/proximity_screen_wired.jpg?1409686551)

## Secure LED Enclosure to Handle

Postion the **dhp-led.stl** part over the top of the handle and line up the mounting holes. Make sure the triangle piece is pointing towards the barrel. This serves as line of sight. Add two #4-40 flat phillips screws to join the part to the handle.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/467/medium800/proximity_led-secured.jpg?1409776949)

## Secure LED Matrix to Enclosure

Flip the part over and fasten 4 #2-56 flat phillips screws to secure the LED Matrix to the enclosure.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/353/medium800/proximity_scnreen_cover.jpg?1409686773)

## Add Cover to LED Enclosure

Snap the **dhp-led-cover.stl** part on top of the LED Matrix to cover it up.

![](https://cdn-learn.adafruit.com/assets/assets/000/019/482/medium800/proximity_gun-hero.jpg?1409781730)

## Measure In Style

Now you ready to test out your shiney Ultrasonic Ruler.


## Featured Products

### Quad Alphanumeric Display - Red 0.54" Digits w/ I2C Backpack

[Quad Alphanumeric Display - Red 0.54" Digits w/ I2C Backpack](https://www.adafruit.com/product/1911)
Display, elegantly, 012345678 or 9! Gaze, hypnotized, at ABCDEFGHIJKLM - well it can display the whole alphabet. You get the point. This is a nice, bright alphanumeric display that shows letters and numbers in a beautiful red hue. It's super bright and designed for viewing from distances...

In Stock
[Buy Now](https://www.adafruit.com/product/1911)
[Related Guides to the Product](https://learn.adafruit.com/products/1911/guides)
### Quad Alphanumeric Display - Blue 0.54" Digits w/ I2C Backpack

[Quad Alphanumeric Display - Blue 0.54" Digits w/ I2C Backpack](https://www.adafruit.com/product/1912)
Display, elegantly, 012345678 or 9! Gaze, hypnotized, at ABCDEFGHIJKLM - well it can display the whole alphabet. You get the point. This is a nice, bright alphanumeric display that shows letters and numbers in a beautiful blue hue. It's super bright and designed for viewing from distances...

In Stock
[Buy Now](https://www.adafruit.com/product/1912)
[Related Guides to the Product](https://learn.adafruit.com/products/1912/guides)
### Adafruit Trinket - Mini Microcontroller - 5V Logic

[Adafruit Trinket - Mini Microcontroller - 5V Logic](https://www.adafruit.com/product/1501)
 **Deprecation Warning: The Trinket bit-bang USB technique it uses doesn't work as well as it did in 2014, many modern computers won't work well. So while we still carry the Trinket so that people can maintain some older projects, we no longer recommend it.** <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/1501)
[Related Guides to the Product](https://learn.adafruit.com/products/1501/guides)
### 3 x AAA Battery Holder with On/Off Switch and 2-Pin JST

[3 x AAA Battery Holder with On/Off Switch and 2-Pin JST](https://www.adafruit.com/product/727)
This battery holder connects 3 AAA batteries together in series for powering all kinds of projects. We spec'd these out because the box is slim, and 3 AAA's add up to about 3.3-4.5V, a very similar range to Lithium Ion/polymer (Li-Ion) batteries and have an on-off switch. That makes...

In Stock
[Buy Now](https://www.adafruit.com/product/727)
[Related Guides to the Product](https://learn.adafruit.com/products/727/guides)
### Breadboard-friendly SPDT Slide Switch

[Breadboard-friendly SPDT Slide Switch](https://www.adafruit.com/product/805)
These nice switches are perfect for use with breadboard and perfboard projects. They have 0.1" spacing and snap in nicely into a solderless breadboard. They're easy to switch no matter what size fingers you have, but not so easy that they'll get flipped by accident. Work great as...

In Stock
[Buy Now](https://www.adafruit.com/product/805)
[Related Guides to the Product](https://learn.adafruit.com/products/805/guides)
### JST-PH Battery Extension Cable - 500mm

[JST-PH Battery Extension Cable - 500mm](https://www.adafruit.com/product/1131)
By popular demand, we now have a handy extension cord for all of our JST PH-terminated battery packs (such as our LiIon/LiPoly and 3xAAA holders). One end has a JST-PH compatible socket, and the other end has a matching plug. Between the two, 500mm of color coded wire. Handy for wearable...

In Stock
[Buy Now](https://www.adafruit.com/product/1131)
[Related Guides to the Product](https://learn.adafruit.com/products/1131/guides)
### PrintrBot Simple Metal 3D Printer - Black - Assembled

[PrintrBot Simple Metal 3D Printer - Black - Assembled](https://www.adafruit.com/product/1760)
New from Printrbot, the Metal Simple is a brand new rock solid, all metal, fully-assembled Printrbot Simple! As opposed to the [Printrbot Simple Kit](http://www.adafruit.com/products/1735), all of the laser cut wood parts have been replaced by rock solid metal and assembled. In...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1760)
[Related Guides to the Product](https://learn.adafruit.com/products/1760/guides)
### PLA Filament for 3D Printers - 1.75mm Diameter - 1KG

[PLA Filament for 3D Printers - 1.75mm Diameter - 1KG](https://www.adafruit.com/product/2063)
Having a 3D printer without filament is sort of like having a regular printer without paper or ink. &nbsp;And while a lot of printers come with some filament there's a good chance you've been printing up a storm and need something new. &nbsp;That's why we've started carrying a...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/2063)
[Related Guides to the Product](https://learn.adafruit.com/products/2063/guides)

## Related Guides

- [Adafruit LED Backpacks](https://learn.adafruit.com/adafruit-led-backpack.md)
- [Scrolling Countdown Timer](https://learn.adafruit.com/scrolling-countdown-timer.md)
- [CircuitPython Hardware: LED Backpacks & FeatherWings](https://learn.adafruit.com/micropython-hardware-led-backpacks-and-featherwings.md)
- [Trinket-Powered Conference Room Occupancy Display](https://learn.adafruit.com/trinket-powered-room-conference-occupancy-display.md)
- [Trinket Powered Analog Meter Clock](https://learn.adafruit.com/trinket-powered-analog-meter-clock.md)
- [LED Backpack Displays on Raspberry Pi and BeagleBone Black](https://learn.adafruit.com/led-backpack-displays-on-raspberry-pi-and-beaglebone-black.md)
- [Raspberry Pi Physical Dashboard](https://learn.adafruit.com/raspberry-pi-physical-dashboard.md)
- [Trinket / Gemma Mini-Theremin](https://learn.adafruit.com/trinket-gemma-mini-theramin-music-maker.md)
- [Tap Tempo Trinket](https://learn.adafruit.com/tap-tempo-trinket.md)
- [Introducing Trinket](https://learn.adafruit.com/introducing-trinket.md)
- [Secret Knock Activated Drawer Lock](https://learn.adafruit.com/secret-knock-activated-drawer-lock.md)
- [Genesis Poi: DotStar LED Persistence-of-Vision](https://learn.adafruit.com/genesis-poi-dotstar-led-persistence-of-vision-poi.md)
- [LED Trinket Tree Topper](https://learn.adafruit.com/neopixel-led-trinket-tree-topper.md)
- [Trinket Fake USB Serial](https://learn.adafruit.com/trinket-fake-usb-serial.md)
- [Adafruit Arduino IDE Setup](https://learn.adafruit.com/adafruit-arduino-ide-setup.md)
- [3D-Printed Bionic Eye](https://learn.adafruit.com/3d-printed-bionic-eye.md)
