Tuesday, March 01, 2011

Sparkfun's Bluetooth serial-port board

This was preparation for the project in the next post.

I've been tinkering with the BTM-182 Bluetooth serial port module, available from Sparkfun as either a raw module or a convenient breakout board. I've set the baud rate to 115.2 kbaud and connected it to a USB serial port (appearing as /dev/ttyUSB0 on my Linux netbook) and getting power from a USBMOD4 board from Hobby Engineering, whose only purpose here is to provide 3.3 volts. The serial port uses a RS-232 level shifter from Sparkfun.

I wrote some Python code that runs on the Linux netbook. It opens the serial port and provides a teeny calculator-like command interpreter to anybody connecting over the Bluetooth serial connection offered by the BTM-182. Currently I'm using CoolTerm running on a Macbook for that, pairing with the "Serial Adaptor" device using PIN "1234".

Using the calculator-over-Bluetooth looks like this:
Good morning
multiply 3 4 5
60.000000
add 6 8 12
26.000000
Later I'll replace the netbook with a AT91SAM7 microcontroller board, also running a little command interpreter, and use the Bluetooth connection to talk to my Android phone. The next step is to hang some analog data acquisition hardware off the SAM7 and make a low-speed oscilloscope, displaying waveforms on the phone.

No comments: