Arduino: Bluetooth and Relay Circuit

In previous Ardunio projects I’ve experimented with Bluetooth modules and Relay shields.
In this project I combined the two features, creating a circuit that can control a high voltage solenoid using Bluetooth inputs from a PC.

The circuit consists of: an Arudino UNO, a Breadboard shield, an HC-06 Bluetooth module, a 5V Relay shield, a 24VDC solenoid, and a variable DC power supply.

The solenoid is connected to the variable DC power supply and Relay shield. The Relay shield is then controlled by the Arudino Uno, which gets its commands from the HC-06 Bluetooth module.

This Instructable was used to help with the code:

The HC-06 was set up with a voltage divider following this tutorial:
Note that the HC-06 needs to be disconnected when uploading the code. Also it will only be detectable as a bluetooth device once the Arduino has been disconnected from the computer and is running on external power.
Arduino, Bluetooth and Relay-001
Arduino, Bluetooth and Relay-Circuit-002