Introduction: Universal Air Slide Whistle 1000

The slide whistle is a musical instrument often used for comedic effect due to its silly sound. In this instructable, we teach you how to make an air slide whistle! What is an air slide whistle? It follows the same idea as air guitar where you mimic the movement of playing a guitar without actually playing a real guitar. In our case, we created a device that functions similarly to the slide whistle, except a distance sensor replaces the rod and a push button replaces the user having to blow into the whistle. The reading on the distance sensor changes the pitch of the noise and the push button activates it. The LED light are just for show. What makes our air slide whistle "universal" is that you can upload different sounds to it besides a whistle noise (i.e. wookie noise, trombone, didgeridoo, or any other sound bit you want)! We made this project in collaboration with the Femineers of Fremont Academy for our Electronics class in Pomona College.

Step 1: Gather Your Supplies

1. 10K Resistor

2. Sparkfun Bluetooth Mate:

3. HexWear Wearable Electronics Kit:

4. Glove (fabric)

5. Hot Glue Gun

6. Laptop

7. Adafruit NeoPixel Digital RGBW LED Strip:

8. Male to Male AUX Cord

9. Fabric Wrist Band

10. Momentary Push Button Switch – 12mm Square:

11. Solder

12. Soldering Iron

13. Speaker

14. Thin Circuit Board (like the one in the link):

15. Three AAA Batteries

16. Twist Ties (recommend circular twist ties like the one in the link):

17. Ultrasonic Range Sensor:

18. Wire Cutters

19. Wire Strippers

20. Wires (different colors are best, one is fine though)

Step 2: Setting Up the Arduino Code

Step 1: Download the Arduino IDE from the following site:

Step 2: You may have to download the following libraries. Sketch > Include Library > Manage Library. Search for "HexWear HexLED", "SoftwareSerial", and "Wire". Click the box they're in and click "Install"

Step 3: Download the attached Arduino code!

Step 3: Setting Up the Max Code

Step 1: Download the Max program using the following link:

Note: you could get a 30 day free trial of Max. After 30 days, you can continue using the program, but no longer save any new code you make. You can still use pre-existing code you saved during the trial, however.

Step 2: Upload our pre - made Max code

Step 4: Putting Everything Together

Step 1: Soldering the circuitry

1. Grab your blank circuit board and break it down to a manageable size [see image of finished device]. Then, collect your distance sensor & bluetooth module, and solder them to the blank circuit board.

2. Collect a total of 13 wires: 11 short wires (~10cm) and 2 long wires (~20cm). Solder 8 of the short wires to the distance sensor leads (Vcc, GND, Trig, & Echo) and the bluetooth module leads (Vcc, GND, TX-0, & RX-1) using the holes on the circuit board. Solder the additional 3 short wires onto the leads of the LED ring (Vcc, GND, IN). Solder the 2 long wires to the push button. Set aside.

3. Using the circuit diagram shown above, solder the distance sensor, bluetooth module, LED ring, and LED strip onto their corresponding ports. Also, solder the 10kΩ resistor between a Vcc port and the SCL/R3 port for the push button (as shown in the diagram).

[Note: For the push button we used, pressing the button connects adjacent leads (as opposed to the transverse pairs of leads).]

Step 2: Attaching the circuit to the glove

––Position your soldered circuit on the back of the glove such that the distance sensor points away from the thumb and the LED ring is centered on the back of the glove. Use twist wires to securely fasten the circuitry to the glove. Use the glue gun to fasten the push button onto the tip of the thumb so the user can press the button with their index finger.

Step 3: Uploading the Arduino sketch to the Hexwear

––Use a micro USB data cable to connect the computer to the HexWear. Open the provided Arduino sketch and upload the sketch to the HexWear ensuring the right device and port are selected (otherwise, the sketch will not upload). Go to Tools > Board > HexWear and Tools > Port to select the board and port, respectively. Make sure the device is working by checking if the lights turn on when the button is pressed. If it does not appear to work, review Steps 1 & 2.

Step 4: Making your battery pack

––Insert batteries into the battery pack. Using the twist wires, fasten the battery pack to the wristband so that the micro USB plug hangs out of one side of the wristband.

Step 5: Connecting the device to the computer

––Connect the battery pack to power on the device. Go on your computer’s bluetooth settings to add a new bluetooth device. Look “RNBT-AD20” (or something similar) and connect; the pin is 1234.

––Connect the speaker to the laptop via male-to-male AUX cord

Step 6: Setting up Max with the device

  • Make sure the sketch is locked (the lock on the bottom left)
  • Make sure the “X" above the metro object is turned off (not highlighted)
  • Hit the print button going into the serial object
  • Look at the available ports by opening the Max Console on the right (looks like a bulleted list)
  • Figure out which serial port to test—it’s different for each computer. It will probably look like an incoming bluetooth port or the name of your bluetooth module. If there are multiples, just try different ones until it works.
  • Unlock your sketch
  • Inside the serial object you will see “serial k 9600”, where the middle letter, k, is the port name. Make sure this isn’t already the port you want to try, and then change that letter to the port you want to try.
  • Press enter
  • Throughout this process your bluetooth module should be blinking red.
  • If it worked, a green LED will turn on.
  • Keep trying until the green LED turns on.
  • Once you’ve connected, lock your sketch and hit the “X” above the metro object to start listening to the bluetooth communications.
  • Follow the instructions on the Max file to add your sound file.

Troubleshooting w/ Max

  • If you don’t hear sound:

–Make sure the volume on the computer is on.

–Make sure the sound button and both “X” buttons are enabled on Max.

–Make sure the sound file is successfully selected in Max by double-clicking the “buffer~” button to view the sound wave.

–Make sure the soldered connections are intact (esp. power, grounds, and distance sensor connections)

–Make sure you aren’t connected to another Bluetooth device

  • If Max suddenly stops working (or you aren’t receiving serial input from the HexWear):

–Change the port letter to something else, then change it back to the correct port

–Check the bluetooth module’s status light (GREEN means it is functioning properly)

Step 5: How to Use It, and How It Works

First, attach the wrist band with the external battery pack on your left hand. Then, insert your left hand into the glove. You will need to push the button located on your thumb in order to activate the whistle. It's best to put the whistle up close to your face, while your right hand goes in front of the distance sensor. Move your right hand forward and back to control the distance the distance sensor reads, creating different pitches of noise.

How it works: the distance sensor sends out an ultrasonic sound that bounces off a surface and comes back. The distance sensor then determines what distance it reads by how long it takes for the ultrasonic sound to send out and come back. After this signal is received, the distance sensor talks to the Hexwear, which talks to the LED ring and LED Strip, activating a certain amount of LEDs depending on the distance. The further the distance sensor reads, the more LEDs light up. In addition, the bluetooth device is reading the distance information from the Hexwear and sends that information to the Max software on the laptop. The Max software then outputs a certain pitch of sound, which gets amplified by the external speaker.

We mentioned in the introduction how this Air Slide Whistle can play multiple sounds depending on which one you upload on Max. Feel free to use our selection of sound files! Included are: whistle sound, mom's spaghetti, a meow sound, I don't care that you broke your elbow, my name is Jeff, Spongebob laughing, and yodeling Walmart kid!

Arduino Contest 2019

Participated in the
Arduino Contest 2019