Introduction: Bluetooth TFS LED Strobe Light

Diagnosing and fixing build problems is a regular task in software development. Team Foundation Build provides tools to help debug and resolve software problems such as failed or partially successful builds, exceptions, errors, or warning and unexpected events or results.

In a typical software development team the are more then one developer working on the same sofware project. The team can use Team Build to automate the compilation, deployment, and testing of its software products. Small and big software teams use the popular software practise ´Continuous integration´.

Continuous integration is the process of generating a build whenever a developer checks code into the source control server. One drawback of this build type is that corrupting source code can pass into version control and subsequently failing to compile the current version.

If we have any broken builds, we need to get the details for the build as soon as possible so that we can inform the developer who may have broken the build. Why is this important? In big software teams every developer is checking in code. So the developer might be the person who broke the build or it may not, since more than one person may have checked in code.

I am a C# software developer and a TFS build master. So i like to write software and also define the build process and branching strategies, coordinate build schedules, creating internal release builds for DEV and QA, creating external release builds for customers. In my spare time i like to expirement with new technology like IoT, opensource hardware like Arduino, Netduino, Genduino.

To increase the fun factor in the software development team i came with the idea to build a team foundation build LED. The team foundation build LED will flash when a broken build is detected on the source control server. The communication with the LED is done with a serial bluetooth receiver, because it is wireless the team foundation build LED can be placed anywhere in the department. It will also be an eye catcher for visiting customers.

As an extra the LED build strobe also measure the temperature and humidity in the working area. This data is send to the client computer which is running a winforms application to display the data on the computer.

Step 1: Hardware

  • Laptop with access to a Team Foundation Server and serial bluetooth modem.
  • Arduino Uno R3 - Board
  • SparkFun Bluetooth Modem BlueSMiRF Silver
  • DHT11 or equal
  • 12V 240 LED Beacon Flashing Emergency Warning Strobe
  • Plastic WaterproofEnclosure Case
  • Car Wire Cord Clip Cable Holder Tie Clips
  • AC 100-240V To DC 12V 1/2/3A Power Supply Adapter
  • Dupont Wire Jumpercables 30cm
  • M3 x 12mm Brass Hex Standoff Hot with nut AK
  • M3 x 10mm Brass Hex Standoff Pillar Male
  • M3 x 12mm Brass Hex Standoff Pillar Female
  • M16 16mm 5 Pin Screw Type Electrical Aviation Plug Socket Connector
  • M12 12mm 2 Pin Screw Type Electrical Aviation Plug Socket Connector
  • M16 16mm 3 Pin Screw Type Electrical Aviation Plug Socket Connector
  • Black&Red Wire Cable 300v 80°C
  • 4 Channel 5V Relay Module
  • 1PCS Whip Automotive Fuse Holder
  • 1PCS 15A Fuse
  • 12V to 5V 3A 15W DC/DC Converter Circuit Regulator
  • 1 pcs x In-Line Fuse Holder For 3AG 5x20mm Fuses NEW
  • M3 x 12mm Metal Stainless Steel Head Screws
  • Tin Lead Rosin Core Solder Flux Soldering Welding Iron Wire Reel
  • Heat Shrink Tubing Wrap Sleeve Kit.

Always power the Arduino board with the external power adapter before connecting the usb cable to the computer for uploading the Arduino sketch. If the external power adapter is not connected the power regulator on your arduino board will be very hot and can damage your Arduino board. The 12V to 5V power regulator is drawing too much current from the USB when the power regulator is not connected to the external power source.

Extra relais output
We are using a 4 channel relais. In the example we only need two channels. One for the power, Second for changing the LED blinking mode. The other two channel are optional. In my example i don´t use the two channels but i have connected it to the 5 pin screw type electrical aviation plug socket.

Step 2: Software

The software is build up into two parts.

Client Windows Machine
First we have to develop a winforms application which can be executed on a windows machine. I want the intelligent part of the entire build status processing burden to be rested on the client windows machine. In most cases connecting to the team foundation server is only possible when the windows machine is added in a corporate or private domain of the company. So running the winforms applications on your windows machine solves most security issues because communication with the arduino hardware is done with the bluetooth module. The winforms application has a timer to check the Team Foundation Server every minute. The application then sends the status wireless to the Arduino. The Arduino will process the data and determine the LED mode.

Second the Arduino needs a sketch which drives the LED strobe for different blinking modes. In total i have build two blinking modes. First mode “build in progress” will turn the LED strobe on for 10 seconds. Second mode “build failed” will shift the led strobe mode to a flashing / blinking mode. The arduino also send temperature and humidity data to the client machine and drives the hardware like reset button, bluetooth module, relais.

LED Beacon Flashing Emergency Strobe Modes
The LED strobe unit has seven strobe modes. The LED mode can be changed by grounding the white wire to GND. There is no two way communication between the Arduino and the LED. I needed two modes to represent two build status. One for build succeeded. The second one for build failed. I coded a simple algorithm to count the modes and shift between the two different modes. So when a build failed the Arduino shift 4 times the relais for the new LED blinking mode. When a build is succeeded or a build is in progress the Arduino shift the relais 4 times again to go back to the original blinking mode.

Example beta software
The software i have written works ok, but there are some minor bugs. The main purpose of the written software is to check the build status on the server and control the LED strobe unit. The software is written in my spare time any developer who has written a better example please inform me i´m glad to analyse and publish it.

Step 3: Bluetooth Serial Communication and DHT11

BlueSMiRF Silver

The BlueSMiRF Silver is the Bluetooth wireless serial cable replacement from SparkFun Electronics! The data from the client computer to the arduino is send with this bluetooth module.

Tutorial using the BlueSMiRF bluetooth

Setup up the bluetooth module please go the the following link: using-the-bluesmirf


The DHT11 is a basic, ultra low-cost digital temperature and humidity sensor. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air, and spits out a digital signal on the data pin (no analog input pins needed). The data is read by the Arduino and send to the client computer.

More information on:

Step 4: Wiring

Step 5: Download Example Sourcecode

  • Winforms application (Arduino code included in seperate folder)

Step 6: Video's - the End Result!