3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Arduino controlled Bluetooth-bot

Step 3Test (with kitties)

Test (with kitties)
«
  • bluebot_kitty2.JPG
  • bluebot_kitty1.JPG
  • bluebot_kitty3.JPG
  • bluebot_kitty4.JPG
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.





« Previous StepDownload PDFView All StepsNext Step »
1 comment
Jun 19, 2011. 12:01 PMalexandr m says:
forgive please
help please what all this in Windows

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
86
Followers
4
Author:johndavid400
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 it can't be taken apart or hacked, i'd rather not have it. And I like to do thing...
more »