Shop OBEX P1 Docs P2 Docs Learn Events
RN-42 bluetooth module on boe-bot — Parallax Forums

RN-42 bluetooth module on boe-bot

amzoamzo Posts: 7
edited 2013-07-01 10:27 in Accessories
I've got a boe-bot and RN-42 bluetooth module, but I don't know how to put these two together...Where should I insert the bluetooth module into the board? I tried to looked for tutorials but all I could find were on eb500 instead of RN-42...

Thanks in advance for your help!

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-06-17 15:51
    You can plug the RN-42 into the breadboard if you have room. If not, you can use pluggable wires to connect it. We'll have an AppNote on this very soon.
  • amzoamzo Posts: 7
    edited 2013-06-25 14:09
    Thank you, Chris.


    I looked at the example provided by the documentation but it didn't mention how to deal with GND and VIN on RN-42, so I'm not sure whether my setup is right or wrong:


    I have the GND on P6, VIN on P5, RST on P4, RX on P3, TX on P2, RTS on P1, and CTS on P0.


    I have one wire connecting header P6 on X2 to header Vss on X3, and one wire connecting header P5 on X2 to header Vdd on X3.


    Sorry I don't have a camera with me so I'm not able to post what it looks like...If the description is confusing, I will post a picture later on.


    Thanks!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-06-25 21:13
    Okay, so GND should be connected to VSS on the BoE, which is ground. VIN should be connected to VDD, which on the BoE is 5V. Make sure the jumper on your RN-42 Bluetooth Module is set to 5V. You only want to connect RTS and CTS is you're using flow control. If not these two pins should be tied together on the breadboard and not connected to any I/O pins.
  • amzoamzo Posts: 7
    edited 2013-06-26 09:12
    Thank you.

    So this is what I've got. Would you please take a look to see if it's correct?
    WP_000307.jpg
    1024 x 768 - 118K
    1024 x 768 - 120K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-06-26 16:49
    It appears as though you have the power connections correct, however it also appears that you have the flow control lines (RTS/CTS) connected, but not the RX/TX lines. Flow control is rarely used on the BASIC Stamp, however you do need RX/TX to communicate.
  • amzoamzo Posts: 7
    edited 2013-06-27 11:59
    I see... So now I have power and RX/TX lines connected. and the module is now paired with PC. However, BASIC Stamp software cannot identify the device...

    the Green LED on RN-42 is blinking 1X per second, indicating it's discoverable/idle.

    When I try to identify device, the blue LED lights for 1 or 2 seconds and then goes out.

    I checked the jumper setting on RN-42 and they are correct.

    I also tried to disconnect the device and then reconnect. Still didn't work.

    Do you have any idea how to get BASIC Stamp software identify the device?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-06-27 12:15
    Are you trying to identify the BASIC Stamp Module over the Bluetoth connection?
  • amzoamzo Posts: 7
    edited 2013-06-27 13:04
    Yes.... Is there anything I missed?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-06-27 13:12
    amzo wrote: »
    Yes.... Is there anything I missed?

    Yes, you cannot Identify/Program the BASIC Stamp Microcontroller over the Bluetooth link. For starters you're not connected to the pins that are used during program, nor do you have direct access to them. Second, the DTR pin is required from the PC in order to Identify or Program. And typically a radio link will inherently be too latent for programming, requiring specialized hardware.

    Your initial message did not indicat you were tyring to use the Bluetooth link in this manner.
  • amzoamzo Posts: 7
    edited 2013-06-27 14:29
    I see... In RN-42's documentation, there's a sample BASIC Stamp program, so I was trying to get that work...

    Actually, I'm working on a project that allows a joystick to remotely control the Boe Bot. I've already had a C# program working together with BASIC Stamp code to implement it while the Boe Bot is connected to PC via USB cable. Thought I just need to replace the USB cable with the Bluetooth module to enable a wireless control.

    I followed the projects posted in this post (How to create a communications template in VB and Twin Servo Control):
    http://forums.parallax.com/showthread.php/96973-VB-Express-to-Stamp-Template?p=671804#post671804

    To run the program, I need to first run the BASIC Stamp code and then I can establish a connection through the c# code and control servos.

    So, is it even possible to get this implemented with Bluetooth (specifically, using RN-42 module)?

    Thanks!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-06-27 14:42
    I think you're confusing the Bluetooth data link with the USB/Serial programming link. Your BASIC Stamp Module is programmed and detected (identified) by the BASIC Stamp Editor over the USB or Serial interface to your PC. the Bluetooth connection will be on a different COM Port on the PC and will relay serial data between the Bluetooth device and the PC.
  • amzoamzo Posts: 7
    edited 2013-06-28 14:03
    I don't quite understand (sorry). I looked at this post:

    How to Boe-Bot Robot with Easy Bluetooth Module
    http://forums.parallax.com/showthread.php/112822-How-to-%E2%80%93-Boe-Bot-Robot-with-Easy-Bluetooth-Module

    I guess the only difference between my Boe-Bot and the one in that post is that the bluetooth module used. So I followed the suggested steps: pair the Bluetooth module to PC, included the Bluetooth COM port, ran the TestBluetoothConnection.bs2, unplugged the serial cable from Boe-Bot, and opened a new Debug Terminal. But when I tried to select the outgoing COM port (Bluetooth COM port), it says "cannot open port: reason unknown."

    So do you have any idea what's the problem? Or is it because I'm using a different module than the one used in that post?

    Thanks for your patient help :)
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-06-28 15:16
    Well, if you're following the details on that guide and using the source code it's probably not going to work exactly as it is. The EasyBluetooth Module is a different device and may require a different procedure to connect to from your PC. Perhaps that post will be updated to work with the RN-42 Bluetooth Adapter at some point.
  • jplrobotjplrobot Posts: 12
    edited 2013-06-29 09:07
    Anxiously waiting for the App Note on how to use the RN-42 with the basic Boe-Bot. This will be greatly appreciated and hopefully will cover the variety of scenarios that have been posted in the recent past.

    Thanks.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-07-01 10:27
    I plan on wrapping it by the end of this week.
Sign In or Register to comment.