Bluetooth
Please also see this page, which uses a BlueSMiRF radio to wirelessly report temperature/humidity. It is a nice, small example of how to put together a project around the BueSMiRF and arduino. Source code included.
Recently I had the need to order a BlueSMiRF from SFE. This stands for Serial Miniature RF device, and works similar to a modem. After finding a working 9v battery, I hooked it up to an Arduino. After pairing the device with my laptop, the link would activate any time the assigned COM port was opened by an application. It closes with the COM port as well. When connected, there is an always on red LED. I made quick work of that by picking off the SMD resistor – In battery-powered projects, this is an unnecessary drain. I left the green LED functional, as this only blinks when the modem is disconnected.
Apparently, m$ hyperterminal doesn’t work right with the BlueSMiRF. But with a simple application, the modem can be talked to. After clearing up how things should be connected, the modem was put in place. That is, with the TX/RX pins of the modem attached to the RX/TX pins of the arduino (0 and 1). If using a USB arduino as in the below picture, the jumper must be set to use external power (9v). Keep in mind the modem’s baud rate – I have mine programmed to work at 115200bps.
The pencap-like thermistor sits in a voltage divider with 5v. The 9v to 5v voltage converter output is connected to the four-pin header pictured. With the jumper set to 9v, the FTDI chip is off, and the bluetooth modem can communicate. RX and TX of the bluesmirf/arduino are paired, and the RTS/CTS jumper on the modem has solder bridging it for no flow control.
The software had to be designed around the limitations and what to expect. Still, the microcontroller offers enough memory to do tasks and log data without the computer being connected. This is an essential improvement over older designs.

Upon starting, the software opens the COM port that is paired with the device. +++ is used to get into command mode, and ATMD enables communication with the Arduino. The graph is just for fooling around, as you can see there are no units. This is a test program.
The bluetooth modem has AT commands that can be used to set things up. I changed the baud rate to 115200bps, and changed the service IDs. Normally the device comes programmed as “Blueradios” and service “COM0″ (which is NOT an actual port, it’s just a name that can be changed). Named, the bluetooth wizard comes up like this:


The microcontroller takes two bytes at a time (command, and optional data). When returning data, it is “encapsulated” where the first byte is used to indicate length of the message. This is so the receiving end knows when it has received a whole “packet” (and processing doesn’t take place until that happens). Note that upon the host computer connecting, by default the modem tells the arduino, and likewise for disconnect. So upon connection something like this would come out:
[cr][lf]CONNECT,[stuff][cr][lf]
I haven’t checked the datasheet as to what [stuff] means. At 115200 everything seems to work well. When the host PC disconnects, a similar DISCONNECT message appears.
Arduino BT
The arduino BT combines a bluegiga bluetooth modem with an atmega168. The power input takes ~1.2 to 5.5v, and there is an upconverter so two 1.5v batteries can be used to power the board at 3v. With this board, the arduino compiler must be set to use the atmega168. Both the “Upload to IO board” and the arduino BT’s reset button must be pressed at the same time for programming to work.
With the arduino BT there are no connect/disconnect messages as with the BlueSMiRF. As it uses a bluegiga modem, the datasheet and command set applies. Setup is same as above in WinXP.


