InduinoX User Guide - Interfacing with the Wireless Shield / BTBee

Bluetooth control seems to be the In-Thing! hook up your InduinoX with your Android phone over Bluetooth and zap you go... With a little bit of Android Expertise, you can double the potential of your Arduino Projects.



So How does one hook up the InduinoX over Bluetooth?

For this, we are going to use and Xbee shield and a Bluetooth Module - BTBee

The Xbee shield is a low cost arduino shield for plugging in any device with the XBee foot print. The shield offers the flexibility of using any of the digital pins for Rx/Tx through a jumper setting mechanism. In our case, we will stick to use the default Rx/Tx pins of the InduinoX. For those of you willing to explore further, check out Software Serial using arduino.

The BTBee is a low cost serial bluetooth module with the same footprint as an Xbee. The BTBee has 2 LEDS a Red led for Power and a Green led for status indication. The Green led will be constantly blinking till the device is paired. Beware! the BTBee has a lot of dummy pins just to match the XBee footprint. In effect, it uses only 5 pins


Pin  Description
1 VCC  Power supply
2 TX  Data output
3 RX  Data input
5 Reset reset
10 GND  Ground

Place the BTBee on the Xbee shield as shown in the video. Upload the following test program onto the InduinoX and then place the shield on top of the InduinoX board. Remember place the Xbee shield only after uploading the program as otherwise you might face an error. (Since we use serial communication for programming, if there are other devices attached to the default serial port, programming the microcontroller will throw up an error.)

The test program expects a serial character 'A' to turn ON the led on the 13th pin and another character 'B' to turn it OFF.

Next Download the following App for your android phone BlueTerm

The BlueTerm App is a terminal app for Android that can simulate a Serial Terminal over Bluetooth.

Power your InduinoX (you can use USB power), turn on Bluetooth on your phone and scan for devices. If this is the first time you are pairing with the BTBee module you will see a set of numbers (the device id) try to pair with this using the code '1234' once it is paired, it will show up as 'linvor'. Now open the app and connect to linvor. Once connected, the app will show a message as connected and the Green led on the BTBee will stop blinking and remain stable (ON) Now type in the characters and get control of the LED on the InduinoX!

Here's the sample code. Make fun with Bluetooth!

 void setup()  
 {  
  Serial.begin(9600);  
  pinMode(13,OUTPUT);  
 }  
 void loop()  
 {  
  if(Serial.available())  
  {  
   int val = Serial.read();  
   if(val == 65)  
   digitalWrite(13,HIGH);  
   if(val==66)  
   digitalWrite(13,LOW);  
   Serial.println(val);  
  }  
 }