The goal was to make a bluetooth sampling board for the EEG/ECG sensor board Adam and I made. This will allow us to beam the physiological data to bt-enabled devices. I used the fully integrated RN41 Sparkfun board for ease of use.
Given the tight timing of this week, I demonstrate below the actuation of an LED via the Bluetooth link. A small Tk interface application was also coded (with details to be added later) that allows the user to set the color of the RGB LED on the board using the OS-specific color picker.
Ultimately, the goal is to have the sampler board change the color of the LED to reflect the EEG / ECG activity measured by the sensor board as well as transmit the data via bluetooth to the user's cellphone or other personal device. The form-factor is made to fit on glasses, which will be the final project for this class.
When shipped, the bluetooth module is in a default state that will not allow communication into the electronics. You need to configure the module as a DTE (Data Terminal Equipment). Reading the datasheet for the module shows that you can change its profile (not "mode" but "profile" in their jargon) to the DUN-DTE profile (#2) by executing the following commands on the serial interface:
#Enter command mode $$$ #Set the module to the DUN-DTE profile S~,2[cr][lf] #Reboot the module R,1
Where [cr][lf] indicated the carriage return and line feed passed by your terminal emulator (hyperminal, coolterm...)