Step 3: Test (with kitties)

Once you have made the connections between the Bluetooth mate, Arduino, and L298N motor-controller, it is time to install the batteries into the battery compartment. and load the code to the Arduino.

With the code loaded, you will need to "pair" the bluetooth adapter and Bluetooth Mate on your computer. The process to do this will be slightly different depending on what Operating System you are using. First plug in any standard bluetooth adapter

The following steps will describe how to pair your Bluetooth device using Ubuntu 10.10:

Step 1. Turn On Bluetooth-bot and make sure the power LED on the Bluetooth mate is On (blinking red).
Step 2. Open your bluetooth manager (System > Preferences > Bluetooth Manager) - if not installed, open terminal and type:
"sudo aptitude install blueman", and then continue.
Step 3. Click the Search button to discover new devices.
Step 4. Right click on the Bluetooth Mate from the list (mine was listed as "FireFly - A4C7") and select the option for "Serial port" - you might also see your cell phone show up on the list if available, make sure you select the correct device.
Step 5. Now you will see a dialog box asking for the passcode of the Bluetooth Mate - mine was set by default to "1234".
Step 6. With the passcode entered, your Bluetooth Mate should now be connected to your PC - the red blinking light on the Bluetooth mate will turn solid green to let you know that it is connected.
Step 7. To control the bot, open a terminal and type the following: "screen /dev/rfcomm0 115200"

The full instructional video on how to set up your Bluetooth-bot with your PC is here:

Now you should be controlling your robot using the keyboard. Make sure the Caps lock is turned Off and use the following keys (lower-case i, j, k, and l) to make your robot move. Holding a key down will result in constant movement, let go and the bot should stop:

forward = "i"
reverse = "k"
left = "j"
right = "l"

speed value UP = "."
speed value DOWN = ","
max speed = "/"

Additionally, you can change the speed value that is written to the motors by pressing the period, comma, and back-slash keys. The "comma" key is used to lower the speed value (from 0-255), the "period" key is used to raise the speed value (increments of 5), and the "back-slash" key is used to set the speed_value to 255 (max).

Any other key that is pressed on the computer keyboard with the terminal open, will yield a response (the LED will blink), but no motor action will be commanded. If you would like to assign different keys to the control functions, simply open the serial monitor (at 115,200 bps) and press the key you would like to use - the Arduino will display the BYTE value on the serial monitor of any key that is pressed, so you can record the value shown and modify the sketch accordingly.

Once you get your Bluetooth-bot working, feel free to add more movement functions and modify the code as you please - if you mess it up, just download the original code again. The code is also available on the next page for viewing.

<p>you are talking about terminal in step 7 which terminal is that....how to get that??</p>
<p>You made nice project</p><p>I made simple Do it yourself in 10 minutes bluetooth controlled home automation</p><p><a href="http://www.instructables.com/id/Take-control-of-your-house-in-10-Minutes/" rel="nofollow">http://www.instructables.com/id/Take-control-of-your-house-in-10-Minutes/</a></p>
Does it work for a smartphone
<p>does it work for a mobile phone</p>
<p>Thanks a lot</p>
<p>cual es el valor de las resistencias del l298n</p>
<p>i am trying to make this project with a l298nIC will it work with that ?I just don't know than which pin on the l298nIC is used for supplying the voltage to the motors </p>
<p>how to control it from computer is there any software</p>
<p>how to control it from computer is there any software</p>
<p>how to control it from computer is there any software</p>
<p>I didn't understand the computer's side. How are we sending different values by pressing different keys??</p>
<p>good instructable, you could use one of these:-</p><p><a href="http://www.ebay.co.uk/itm/111202844111?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649" rel="nofollow">http://www.ebay.co.uk/itm/111202844111?ssPageName=...</a></p><p>this saves using a arduino plus a motor controler.</p><p>also why not use the arrow keys on the keyboard (easier to remember) or a android phone.</p>
<p>sure, I have played with Dagu and it should be sufficient as long as your motors don't require more than 1amp. It would definitely work on the toy tank that I bought... and should work on most toys.</p><p>Also, you can map the controls to any keys you want... though all keyboards have I, J, K, L, so I just used those. Most keyboards have up/down arrows, so that should work just fine. You would just need to open the serial monitor and see what code is sent across when you press those keys.</p><p>You can also use an android phone, but at the time of writing this, I didn't have an android that would allow me to pair to the bluetooth module... might try this with my newer phone.</p>
<p>Hi. This is a great instructable. I have one question. How do you power the power shield, motors and arduino. Do you use one 12 volt battery and connected in parallel to the arduino and shield or it is two separate power sources?</p><p>Thanks!</p>
<p>hey mate </p><p>was wondering, is this usable on windows at all??I have all the components but I'm not sure how to control it</p><p>love the project </p><p>eagerly awaiting your reply :) </p>
Can you use the arduino motor shield? Instead of the L293D
hey <br>i also wannna do a similar stuff. i want to design a robot for surveillance where the robot will be fully autonomous and it wil move for point A to point B autonomously. <br>i want u to help me in designing the autonomous motion planning system to go form one given place to the other using sensors n stuff...i m stuck pls help <br> <br>i have bought the rover system from here just for making prototype of the actual system since i got it at a good price... <br>http://danuc.com/index.php?main_page=index&amp;cPath=6 <br>http://danuc.com/index.php?main_page=index&amp;cPath=4 <br>http://danuc.com/index.php?main_page=index&amp;cPath=1 <br>http://danuc.com/index.php?main_page=index&amp;cPath=7 <br>http://danuc.com/index.php?main_page=product_info&amp;cPath=8&amp;products_id=52 <br> <br>pls reply
will this work with the arduino app for like apple or android devices
Yeah does the same code work for L293D? please answer.
Yeah does the same code work for L293D? please answer.
sir does the same code works for the L293D motor driver Ic ??
sorry for the late reply, <br>tthe manner in which you are controlling the bot, the same manner i want to apply.. as long as the user presses i,j,k,l.. the bot should perform the same action. <br> the user must not press enter to feed the instructions for directions.
hye <br>will this program also work over using xbee?? <br>also how to give continuous input for direction control without pressing enter.. pls help.. need it for project. <br>thnx
sure it will work over xbee, just without the pairing process used with the bluetooth... xbee is actually far easier to set up and has a far better range, but is more expensive to buy 2 xbee radios than one bluetooth adapter and a bluetooth module. <br> <br>what method of control are you going for? I assume you would like to press forward once and let it go forward until you press another button?
Is there a way to use a PS3 controller (bluetooth) to control the robot? It would make it a lot easier to control the robot using a hand held controller rather than a keyboard. Please let me know.
Hiya! <br>Can it work with Windows, You said that the video will explain connecting it to your PC, But it only shows using Ubuntu... <br>Nolan5683 asked an interesting question... Is it possible? <br> <br>Thanx!
How did you make the motors run as long as you pressed the button. And what terminal did you use.
can you give me the componets list for the motor controller i can't find the list anywhere,even in the arduino robotics book please
I am new to all this Arduino business and I have no idea what you are really talking about. Is t possible to do this kind of thing, but putting the programming on a Macintosh MacBook. If it is, please tell me!
Hi, <br> <br>I am kind of new to the robot-building-scene, but I really want to give it a try. So I want to apologize in advance for the dumb question. <br> <br>But I still have one thing that I don't understand and I was hoping someone could help me out here. <br> <br>Wouldn't you have to have a (java) program running on your pc in order to send the commands to the bot? or in other words, how does your pc send the info to your bluetooth transmitter? <br> <br>thanks to anyone willing to help!!
would this work the same if it were a &quot;walking&quot; instead of a &quot;driving&quot; bot?
can you please tell me whare to connect bluetooth mate gold.if i am using Sparkfun Ardumoto shield.please tell me
Hi there, I am trying to build a rc tank with the lawnbots cade, What are the en1 and en2 connections for?
im having trouble getting my bluetooth bot to work can please send a more detailed list of instructions so i can get mine to work I used a(n) arduino uno, bluetooth mate silver and a motor shield please respond soon <br>
Is that the linus line bot in tthe pics?
where do you get the tracks from
hey is it possible to do this with a ps3 controller without the computer at all?<br>thanks in advance <br>akinich
hey wat u said i perfetly coorect we cannot connect the dongle to the arduino...but we can make a usb host shield do u have any idea to make and the atmega8u2 i thought that can act as a host!!!???
hey thanks anyway!!!<br>but i bought one of that cheap usb dongles already !i thought that i can hack to use with my arduino but it works with usb well some people say that the chip has serial connection somewhere but it is hard coz wen i looked up the website they say the chip does not exist i checked a lot of times but no use!!<br>so could please find a website or a way to hack those things so that i can use it with my arduino but i cannot afford to buy one usb host shield and i got an arduino uno which has a atmega8u2 which can act as a usb host but i donno how to do it as (im 13, and i dont know wat to do not femiliar with these) so i want help anyone????????????????????
when you say cheap usb dongle... do you mean the type that plugs into your computer via USB? If so, there is no way to connect to your arduino unless you have another bluetooth adapter for the first one to talk to.<br><br>One bluetooth dongle will do you no good here. As with any wireless radio connection, you need both a transmitter and a receiver to make a connection... If you cannot afford a bluetooth receiver, maybe you should try to use a less-expensive wireless connection, like Infrared. <br><br>You can use an old TV remote to send IR signals to an IR receiver (found in an old TV, VCR, or about $4 from Radio Shack), to decode the signals from the tv remote on your Arduino, then make a different movement for each button. I will post some code for this soon.
hey u said that in the pic those cheap bluetooth dongle will work so how will i interferce that dongle with the arduino???any help??
You must use a bluetooth serial adapter (like the Bluetooth Mate Gold or similar) to act as a wireless serial link - this will connect to pins 0 and 1 of the Arduino (the rx and tx pins). You would need to connect the rx pin of Arduino (pin 0) to the tx pin of the bluetooth adapter - and the tx pin of the Arduino to the rx pin of the adapter. Then power the bluetooth adapter using the +5v and GND from the Arduino. Total, you will need 4 jumper wires to make the connections.<br><br>The cheap bluetooth dongle that you speak of, is used to plug into the computer to act as the other end of the serial link. It will send and receive bluetooth signals from the Bluetooth adapter (connected to the Arduino), just like a cell phone or hands-free headset would. <br><br>The Bluetooth Mate Gold is a bit on the pricey side, but any bluetooth serial adapter (that has rx and tx pins) should work.... some people have found units on Ebay for under $20.
Do you happen to remember the name of this RC toy? The tracked chassis looks fantastic. It is exactly what I've been looking for to mate to an Arduino set up.<br><br>
joy stick lol and camera = RCXD
What is it with everyone calling a remotely controlled vehicle and RCXD?! this is just half of what the RCXD is. IT DOES NOT EXPLODE!!! RCXD = Remotely Controlled Explosive Device.
RCNXD = remote controled NON exploding device
Excellent post!<br><br>I've been building a bluetooth controlled tank and been having lots of problems with my bluetooth connection dropping out (using processing and OSC) <br><br>I'm using an ebay purchased bluetooth module (hong kong special) maybe thats my problem?<br><br>Anyway i might give your method a go looks very intuitive. thanks! <br><br>checkout my work in progress: http://www.taphill.com/taphill-tank

About This Instructable


249 favorites


Bio: I have always been one to take things apart to figure out how they work, so most of what I own has been dismantled. If ... More »
More by johndavid400: Arduino controlled Bluetooth-bot Core3duino Arduino R/C Lawnmower (painted)
Add instructable to: