The Bluetooth Mate Silver is a bluetooth module that can be connected to any bluetooth device, like a mobile phone. It comes with 6 pins: RTS-0, RX-I, TX-0,VCC,CTS-I, GND. The default configuration is:

  • Baud Rate:115200
  • 8Bits, no parity
  • Stopbits:1
  • FlowControl:Xon/Xoff
  • Configuration command: $$$
  • Default password(PIN):1234

For more information on these values, check the Advanced user manual.

Configuring your Bluetooth module in the first time

Theoretically it is possible to configure the module in the first 60 seconds after power on. But, we tried and didn't work. So, the second option is to configure using a serial port. You can either use a FDTI module or your Arduino board without the AMTEGA chip (simply remove the chip and you have a FDTI board). Connect your module as show below:

 

 

OR

 

Now, to gain access to your bluetooth module over the serial interface, you can use the Serial Monitor window from Arduino interface or connect it using a terminal program like PuTTY.

 The following picture shows the PuTTY's initial screen. This is your configuration window. Select Serial as your connection type. Then, adjust the Serial line parameter to match your Arduino or FTDI board port (COM1, COM2, etc for windows, /dev/ttyUSB0, /dev/ttyUSB1, etc for linux, or ttyACM1, ttyACM2 for OSX). Set speed to 115200, like your module's default baud rate.

 

 

After that, click open to make the connection:

 

 

On this black screen, type "$$$" to enter in the configuration mode. You will see a "CMD" response. To quit, just type "---".

Turn on the echo mode, typing "+". It will make things easier.

Now you can change the name of your Bluetooth module. Type "SN, your_desired_name_here". This will help you to identify your module in the control panel.

To enable the configuration on both serial and bluetooth connection, type "ST,255".

It's done, your module is ready to use without a cable. Just type "R,1" to restart it.

To enter in the configuration mode, find your bluetooth module from your computer or phone, then use the PIN 1234.

This will create a virtual serial port, that can be used in the same way we did, but over Bluetooth.

 

Arduino Pro Mini with Bluetooth

 

The Arduino Pro Mini board is configured with a 57600 baudrate. So, you have to change it typing "SU,57" in the bluetooth configuration.

Now, download the following code and paste it in the Arduino IDE:

/* Bluetooth Mate Echo

 by: Dalton Hioki based on http://www.sparkfun.com/tutorial/BluetoothMate-Quickstart/Bluetooth... by Jim Lindblom - jim at sparkfun.com

 date: 3/20/12

 license: CC-SA v3.0 - Use this code however you'd like, for any

 purpose. If you happen to find it useful, or make it better, let us know!

 Required connection:

 Bluetooth Mate-----------------Arduino

     CTS-I    (Not connected)

     VCC------------------------5V ou 3.3V

     GND--------------------------GND

     TX-O-------------------------D2

     RX-I-------------------------D3

     RTS-O    (Not connected)

*/

#include <NewSoftSerial.h>

int bluetoothTx = 2;

int bluetoothRx = 3;

NewSoftSerial bluetooth(bluetoothTx, bluetoothRx);

int counter = 0;

int incomingByte;

void setup()

{

 Serial.begin(57600);

 bluetooth.begin(57600);

 delay(100);

}

void loop()

{

 if (Serial.available() > 0) {

   incomingByte = Serial.read();

   if (incomingByte == '0') {

     Serial.println("RESET");

     bluetooth.println("RESET");

     counter=0;

   }

 }

 Serial.println(counter);

 bluetooth.println(counter);

 counter++;

 delay(250);

}

Now, open a serial connection via Bluetooth to your module and see the counter counting. If you type 0, the counter will reset.

Uploading a sketch via Bluetooth 

Connect your Arduino TX to the module's RX and also the other way round. Power on your Bluetooth from 3.3V to 6V.

Obs: If you are using linux, you have to simlink your bluetooth's virtual serial port to /dev/ttyUSBXX, where XX is any available number. Do this typing "ln -sf /dev/rfcomm0 /dev/ttyUSB123" (replace 123 by any available port number). We have to do this because the Arduino IDE doesn't show ports that aren't named with ttyUSB. (you have to create this link every time you reconnect your module).

Then, open the Arduino IDE, select Tools > Boards and select the Arduino Pro or Pro Mini board. Select your Bluetooth port in Tools > Ports.

To upload your file, you have to keep pressing the RESET button of your Arduino board until the 'Binary Sketch Size....' message in the IDE.

References:

http://arduino.cc/playground/

http://www.sparkfun.com/products/10393

Views: 5025

Tags: arduino, bluetooth, tutorial

Comment

You need to be a member of GarageLab (arduino, electronics, robotics, hacking) to add comments!

Join GarageLab (arduino, electronics, robotics, hacking)

Latest Activity

Christian Rheinnecker replied to abhishek yadav's discussion how to record time between two events using arduion
"float preTime = millis(); float afterTime; .... Do your Stuff afterTime = millis(); float YouTime…"
5 hours ago
Christian Rheinnecker posted a status
"New Stuff @arduinoprx.de http://www.arduinoprx.de/"
10 hours ago
Profile IconWill Fleming, Elijah Patric, Paul R Avery and 4 more joined GarageLab (arduino, electronics, robotics, hacking)
11 hours ago
GarageLab posted blog posts
21 hours ago
Christian Rheinnecker posted a video

Arduino PrX : Sequencer AM808 VX3 - Recording a Beat to Atari Mega ST 2 in Cubase 3

In this video you see my AM808 VX3 Midi Sequencer Play a Beat and my Atari Mega ST 2 with Satan Disk NVDI 5 and Cubase 3 is recording a Beat in one Part. It ...
yesterday
Doug Hyde updated their profile
yesterday
Profile IconDoug Hyde, Stephen Gray, Mark Evans and 5 more joined GarageLab (arduino, electronics, robotics, hacking)
yesterday
GarageLab posted a blog post

Airburr Flying Robot Attaches to Walls

Airburr was developed at the Laboratory of Intelligent Systems, a branch of the European École…See More
Tuesday
GarageLab posted a blog post

Arduino robotic hand under $200

Robotic hand is one of most important parts in robot equipment. This is main manipulator that…See More
Monday
Profile IconDavid M Patterson, Jordan Hanger , Jason and 3 more joined GarageLab (arduino, electronics, robotics, hacking)
Monday
abhishek yadav posted a discussion

how to record time between two events using arduion

i have a disk rotating at variable speed(max rpm 600) . i want to know how much time it takes to…See More
Sunday
Danny Vigo updated their profile
Sunday
Danny Vigo commented on Fernando Gil's blog post Tutorial: Servomotor + Arduino
"Why would you want to connect them in parallel? Are you trying to increase the current? Perhaps to…"
Sunday
Danny Vigo replied to SATYA NARAYANA REDDY NIMMAKAYALA's discussion 5 stepper motor control code
"Well if you look in the examples that come included with the Arduino IDE you can find some code…"
Sunday
Profile IconEvaristo Ramos, Jr. and Dayan Martinez joined GarageLab (arduino, electronics, robotics, hacking)
Saturday
Christian Rheinnecker posted a status
"New Video Cypress Hill - Rap Superstar https://www.youtube.com/watch?v=VZSFgdrhzQQ"
Saturday
Christian Rheinnecker posted a video

Arduino PrX : Sequencer AM808 VX3 - Demo Cypress Hill - Rap Superstar Beat Play

Demonstration eines Beats auf dem AM808 VX3 Arduino Midi Sequencer Cypress Hill - Rap Superstar Weiter Infos auf http://arduinoprx.de
Saturday
Christian Rheinnecker posted a status
May 18
Christian Rheinnecker posted a status
May 18
Shannon Bradley replied to Dennis Melamed's discussion Little Gem Amp Circuit problems
"Im not sure why people turn to IC's for sound or power. I had this little amp kicking around…"
May 17

© 2013   Created by Marcelo Rodrigues.

Badges  |  Report an Issue  |  Terms of Service