# 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)

- [Next Page](https://learn.adafruit.com/ultrasonic-ruler/circuit-diagram.md)

## 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)
- [CircuitPython Hardware: LED Backpacks & FeatherWings](https://learn.adafruit.com/micropython-hardware-led-backpacks-and-featherwings.md)
- [Arduino GPS Clock](https://learn.adafruit.com/arduino-clock.md)
- [Galaxy Pendant](https://learn.adafruit.com/life-proof-led-necklace.md)
- [Trinket USB Keyboard](https://learn.adafruit.com/trinket-usb-keyboard.md)
- [2014 Halloween 3D Printed Projects Roundup](https://learn.adafruit.com/2014-halloween-3d-printed-projects-roundup.md)
- [IRIS LED and Prop Guards](https://learn.adafruit.com/iris-leds-prop-guards.md)
- [Raspberry Pi Physical Dashboard](https://learn.adafruit.com/raspberry-pi-physical-dashboard.md)
- [3D Printed LED Knuckle Jewelry ](https://learn.adafruit.com/3d-printed-led-knuckle-jewelry.md)
- [Trinket “Question Block” Sound Jewelry](https://learn.adafruit.com/trinket-question-block-sound-jewelry.md)
- [Trinket USB Volume Knob](https://learn.adafruit.com/trinket-usb-volume-knob.md)
- [NeoPixel Arcade Buttons](https://learn.adafruit.com/neopixel-arcade-button.md)
- [Really Simple Animatronic Tail](https://learn.adafruit.com/really-simple-animatronic-tail.md)
- [3D Printed LED Fire Horns](https://learn.adafruit.com/3d-printed-led-fire-horns.md)
- [Adding Third Party Boards to the Arduino v1.6.4+ IDE](https://learn.adafruit.com/add-boards-arduino-v164.md)
- [NeoPixel 60 Ring Wall Clock](https://learn.adafruit.com/neopixel-60-ring-clock.md)
