Shop OBEX P1 Docs P2 Docs Learn Events
RN-42 Bluetooth module and Boe-Bot tutorial — Parallax Forums

RN-42 Bluetooth module and Boe-Bot tutorial

kjnieveskjnieves Posts: 5
edited 2014-02-27 12:49 in Accessories
I own a Boe-Bot and I recently purchased the RN-42 bluetooth module at the Parallax store. I wanted to know if Parallax is working on a tutorial for these. I want to be able to send basic commands to the Boe-Bot from my phone. Thanks in advance. I would appreciate any help.

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-03-28 10:17
    Hello and welcome to the forums! While we are continuing to develop new AppNotes for the Bluetooth Module, the question of control from a Cell Phone revolves around an application on the Cell Phone to pair up using SPP and be able to send commands to the RN-42 Bluetooth Module. So far I am only aware of one Android App which may work and we still need to test it. If you know of Android Applications designed for this type of purpose please link them and I will try to test them and create some code for the BoE-Bot using these applications.
  • kjnieveskjnieves Posts: 5
    edited 2013-04-03 09:40
    Hello and welcome to the forums! While we are continuing to develop new AppNotes for the Bluetooth Module, the question of control from a Cell Phone revolves around an application on the Cell Phone to pair up using SPP and be able to send commands to the RN-42 Bluetooth Module. So far I am only aware of one Android App which may work and we still need to test it. If you know of Android Applications designed for this type of purpose please link them and I will try to test them and create some code for the BoE-Bot using these applications.
    Hi Chris, Here are 3 apps that I found and I am able to pair with the BlueTooth Module:

    https://play.google.com/store/apps/details?id=app.example.bluetooth&feature=search_result#?t=W251bGwsMSwyLDEsImFwcC5leGFtcGxlLmJsdWV0b290aCJd

    https://play.google.com/store/apps/details?id=com.rovingnetworks.android.BluetoothChat&feature=search_result#?t=W251bGwsMSwyLDEsImNvbS5yb3ZpbmduZXR3b3Jrcy5hbmRyb2lkLkJsdWV0b290aENoYXQiXQ..

    https://play.google.com/store/apps/details?id=com.boebot&feature=search_result#?t=W251bGwsMSwyLDEsImNvbS5ib2Vib3QiXQ..



    Thanks for the help, I appreciate it.

    PS, these work on my Nexus 7 very well

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-04-03 16:16
    Thank you, I have a Nexus 7 as well and I will try these apps and if they work I will create an AppNote for the BoE-Bot. Stay tuned!
  • kjnieveskjnieves Posts: 5
    edited 2013-04-07 13:37
    Thanks Chris Savage. I appreciate your help. I'll keep an eye out for the code.
  • kjnieveskjnieves Posts: 5
    edited 2013-04-18 18:20
    Hey Chris, Im wondering if you managed to get any code working?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-04-19 08:51
    Oops! This falls under, "I didn't write it down, so I forgot about it!" =( Not good...and I do apologize. However I just put it in my work, "To-Do" list and Monday I will set something up on my bench at work. It turns out I will be working with the BoE-Bot chassis on that day anyway, so I can wrap two projects at once. Thanks for reminding me. In the future, say, "Chris, write this on your white board". :innocent:
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-04-22 15:10
    My minions, they live! Okay, so I wanted to follow up and say that I spent a good part of today building several demos and did not get to the Bluetooth code yet. However I did get both bots done so I can do the Bluetooth stuff tomorrow. Stay tuned!

    IMG_20130422_150059_751.jpg
    1024 x 577 - 54K
  • kjnieveskjnieves Posts: 5
    edited 2013-04-24 11:09
    Nice, those look very cool. Did they come in those colors?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-04-25 09:49
    No, these are custom for some testing. However, up to this point I didn't have one built to actually do the testing. I have several projects being built at once, so I may post the Bluetoth code this weekend. I did install all three apps you linked. And I do have modules ready to test on a Boe-Bot now. Stay tuned. :thumb:
  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-05-09 17:36
    Any success yet? If you are able to get this to work I will be buying the module around the same time I buy my new phone!!! Edit: It looks as though this one is already setup to control a Boe-Bot: https://play.google.com/store/apps/details?id=com.boebot&feature=search_result#?t=W251bGwsMSwyLDEsImNvbS5ib2Vib3QiXQ.. I know there was a similar app that was used with an Easy Bluetooth module. Not sure if it worked or not as I do not have an Android phone. However, the app for the computer to the EBT module worked great.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-05-10 10:05
    The two Roving Networks Applications aren't really designed for this type of use, in fact one is specifically to access the GPIO lines, some of which are used for specific purposes and others which aren't used at all. As for the Boe Bot specific on, I did check it out, but in my initial searches I could not locate the BS2 code the application is designed to work with. Do you happen to have that code? If so I can test the application. Otherwise I need to write a routine which receives data from the app and displays the values so I can write my own code. I just figured if it already exists, why re-invent the wheel.
  • jplrobotjplrobot Posts: 12
    edited 2013-05-27 02:49
    Chris, Any progress on the tutorial? Anxiously waiting for it.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-05-28 15:36
    Sorry, I was waiting for the poster who posted the links to see if he had the BS2 source code for the application that was linked. I can created my own (and most likely will have to), but this application obviously had BS2 source code designed for the app. If I don't have it this week, then this weekend I will get the Logic Analyzer out and see what is coming in and create some code around that.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-05-30 08:39
    Okay, I found Jason's website and more specifically, the Parallax Boe Bot Project page, which has a code listing. I haven't tested it yet, but I have attached it here.

    Note: This code was designed to work with this Android app from the Google Play Store.
  • jplrobotjplrobot Posts: 12
    edited 2013-06-01 09:29
    The code refers to the Easy Bluetooth module and the PIN commands for RX and TX. The code in the 30086 guide is a bit different. Would appreciate very much if these differences are explained in your tutorial. Thank you.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-06-03 09:01
    I tested that code and I didn't really have much success with it. They way it is written doesn't really follow some important rules when mixing serial input with servo refresh. I still need to determine if the issues I am seeing are on the sending end or the receiving end. I noticed when holding down a direction key the data started to change until I was getting all 255. I will look more into it as I go.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-06-18 13:24
    Okay, progress on the Bluetooth interface. When I was trying to get the BS2 code working with the App from the same author I was having some issues and decided to DEBUG what I was getting, which really only compounded the issue since the BASIC Stamp 2 cannot receieve data as fast as it is sent while trying to refresh the servos. The result was corrupted values causing the Boe-Bot to become unresponsive.

    I captured 25 Ms from the RN-42 (stand-alone) @ 1 Mhz with data coming in at 9600bps. The attachment shows what was received as I held down and pressed different keys on the Android app. Obviously nothing is corrupted there which means I was right in the problem being on the BASIC Stamp side. So I will work on this again and see what I come up with. In the mean time I will probably release code for the Propeller Activity Board which will also work on the Propeller BOE. More to come.
  • GianniGianni Posts: 1
    edited 2014-02-27 05:58
    Hallo
    I got a boe bot with a gripper and we wanne let him drive with the RN-42 bluetooth can you help me ?
    already thanks for your help
  • FranklinFranklin Posts: 4,747
    edited 2014-02-27 12:49
    Gianni, it would help if you would start your own thread and explain in more detail the hardware you are using and just what you want to accomplish. Also the code you are using and how you have things connected together.
Sign In or Register to comment.