Arduino + Bluetooth

Imagine Arduino commands, untethered from the wires of a computer. This dream becomes reality when the Arduino is connected to a bluetooth module like the DSD HM-10. Using commands over bluetooth, you can wirelessly control the Arduino from anywhere in the room (and probably a few rooms down the hall too)! This sketch below uses the DSD HM-10, an Arduino, and a servo motor. It was designed to dump glitter, ahem, reflective particles for fluid motion visualization and velocity measurements. Any serial command sent causes the servo motor to turn a small cup over. The fritzing circuit and bluetooth setup steps for a smartphone are shown below.

Fritzing Circuit

Using Smartphone to Sent Bluetooth Commands

First, you will need an app that allows you to send bluetooth commands to open, nearby devices. I use BLE scanner for iPhone, but the Google Play store might have better ones. Here is how I send a command to the HM-10 (this one is named "Tile", but the one used in lab is named "Lil Jon"). After this command is sent, the servo turns the cup 180 degrees from its initial position.

Step-by-Step Bluetooth Commanding

Step 1: Open BLE Scanner or other BT Communication App


Step 3: Click "Custom Service" near the bottom of the screen.


Step 5: Enter a Hex Value or Text Value and Click Write.

Step 2: Locate the device on the nearby list and click Connect


Step 4: Click WriteWithoutResponse in blue.





Great Job!

Arduino Code