I wanted to make it possible to control an arduino board from my phone.
So that I could control other devices.
the easiest way seemed to be using bluetooth.
but when I received the parts needed I found it want quite as simple as I had hoped.
And after looking on the Internet I didn't find much information to help.
so I have decided to write this guide to help other people that are thinking of doing the same thing.
Remove these ads by
Signing UpStep 1: Parts needed
1 arduino board ( I used the duemilanvoe 328)
1 bluetooth serial board ( I used the sparkfun bluesmirf)
some pieces of wire
1 led
A computer with bluetooth or a usb bluetooth adaptor.
A pocket PC with bluetooth
Software needed
the arduino enviroment software
and some serial terminal software ( I used putty)








































Visit Our Store »
Go Pro Today »




Think HTML replacement for micros. The Arduino is the micro-server and pfodApp is the micro-browser.
www.pfod.com.au has complete tutorial examples of controlling micro devices from Andriod with NO Android programming.
My code:
char val; // variable to receive data from the serial port
int ledpin =13; // LED connected to pin 13 or onboard LED
void setup()
{
pinMode(ledpin, OUTPUT); // set ledpin as OUTPUT
Serial.begin(9600); // start serial communication at 115200bps
}
void loop() {
if( Serial.available() ) // if data is available to read
{
;
}
val = Serial.read(); // read serial and store it in 'val'
if((val == '0' ) || (val == 'off')) // if '0' or 'off' was received ledpin is switched off
{
digitalWrite(ledpin, LOW); // turn ledpin Off
Serial.println("ledpin off");
}
if((val == '1' ) || (val == 'on')) // if '1' or 'on' was received ledpin is switched on
{
digitalWrite(ledpin, HIGH); // turn ledpin ON
Serial.println("ledpin on");
}
}
Thanks
i need to ask a few questions about connecting hardware.
1)why do we need to connect cts1 and rts0 ports?
2)why do we need to connect Rx on Arduino with Tx on BlueSmirf, and Tx on Arduino with Rx on BlueSmirf?aren't they supposed to be reciprocal?
thanks in advance
and the Rx means receiving communication Tx means sending. so the send of the bluetooth module goes to the receiving of the arduino and vice versa.
Today I was playing with my Arduino Uno and my old PocketPC (Dell Axim), I'm doing the same thing with a different approach: instead of using Putty, programming my Axim with Basic4PPC and I'm able to read/switch on/off any of the Arduino's digital pins, or read/write any of its analog pins. At first, I thought of using EVB (Embedded Visual Basic which I think is free) but handling bluetooth with it is very hard
Congratulations for your instructable and greetings from Spain.
Thanks +Fav
http://www.ebay.co.uk/itm/1pcs-TTL-Bluetooth-Module-adapter-board-/270808764130?pt=LH_DefaultDomain_0&hash=item3f0d75cee2
Can this breakout be connected to my Duemilanove directly.
In my mind the arduino is 5V TTL logic, but the Bluetooth module is 3.3V TTL based.
Thanks in advance.
I like your post about the Bluetooth module.
Now I'm trying on my own to connect as you descibed in your howto using this module:
http://www.ebay.co.uk/itm/Arduino-Bluetooth-Module-Slave-Wireless-Serial-Board-/390333614711
I connected TX to RX and RX to TX and the power supply as well GND and 5V.
Pairing works very well and the BT module indicates that connection was established, after typing the "password" 1234 in.
Now i have difficulties sending data "1" to switch the LED on. That does not work.
The only difference from my module compared to yours is that i haven't connected the KEY and the STATE connector. It is descibed in the datasheet on ebay that they are not necessarily needed.
If i open serial port monitor in Arduino SDK and sending any kind of data to the arduino via BT no RX light is flashing - that confuses me right now.
Any idea what's going wrong there?
Help would be highly appreciated.
Greetz
Andi
I have just received my BT module (from the same auction) and it works perfectly.
The problem is with Simon's code. I have modified it slightly and it works ok.
Here is the code: http://pokazywarka.pl/dfdzc7/
Regards
Tom
http://cgi.ebay.com/Bluetooth-Transceiver-Module-RS232-TTL-backplane-/390291743909?pt=LH_DefaultDomain_2&hash=item5adf3364a5
(My computer does have a bluetooth receiver 300 meters range)
Awaiting your reply...
This is a really cool instructable for people like me who are a bit ....
So we need to click enter after typing in (0 or 1 as in your program)
Thanks
Thank you!
Great! thanks a lot! I used a standard serial Bluetooth adapter module and it works perfectly! :-)
But if you read the documentation on the arduino board there is a current limiting resistor on pin 13 for this purpose.
Very interesting, might give this a go. I assume this a BlueSMiRF Gold?
Thanks
Rory