Shop OBEX P1 Docs P2 Docs Learn Events
how to send data through PC to boebot using eb500 bluetooth — Parallax Forums

how to send data through PC to boebot using eb500 bluetooth

GrishmaGrishma Posts: 9
edited 2014-11-26 16:42 in General Discussion
I am a beginner and I have a code in C++(in .net using OpenCv) that calculates distance value.Now I need know how to communicate this value to the boebot using basic stamp2 program through eb500 Bluetooth.Please mention that it support real- time scenario so that the boebot travels that much distance after receiving it from PC. Please provide a detailed description of steps/code that has to be implemented.

Comments

  • PublisonPublison Posts: 12,366
    edited 2014-11-23 15:41
    Welcome to the forum!

    Your other post has been deleted because it is against forum rule to cross post.

    [Qoute]No cross-posting:
    Cross-posting is: 1) submitting a post to one forum or thread, and then submitting a second linking to the original post (without changing content or intent), or 2) creating an identical post in more than one forum or thread. When the same content is found in more than one post, even under different subject lines, the forum moderator will remove one (or more) of the redundant posts.
    [Quote/]

    Please read the forum rules:

    http://forums.parallax.com/showthread.php/134682-Forum-Guidelines

    Please allow enough time for people to respond as you have asked for a lot of information with many involved procedures.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-11-24 06:05
    To begin with, you need Bluetooth at the PC as well as Bluetooth on the BOEbot.

    Do you have a working Bluetooth dongle installed on the PC? If not, you only have 50% of the hardware required. You might consider starting with an Android device or a notebook computer that already provides Bluetooth rather than shopping for more hardware.

    Getting any further depends on what device you are using and which OS.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-11-24 08:48
    Go ahead and buy Erco's cheap dongle at your own risk. It may or may not be supported by your OS.

    I use Linux and I know that I have to verify devices support Linux. Maybe, you will have better luck in Windows, maybe not. I dunno what OS X is up to.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2014-11-24 20:54
    Is this a school project?
  • GrishmaGrishma Posts: 9
    edited 2014-11-25 07:52
    NWCCTV wrote: »
    Is this a school project?

    No its a bigger project titled "Gesture Controlled robot"
  • GrishmaGrishma Posts: 9
    edited 2014-11-25 07:53
    I have an inbuilt Bluetooth in my pc
  • Mike GreenMike Green Posts: 23,101
    edited 2014-11-25 11:47
    As far as the BoeBot is concerned, the EB500 acts as a substitute for a wired serial connection. You'd use the SERIN statement to receive data and the SEROUT statement to send data. The Stamp doesn't care what's on the other end.

    Your in-built Bluetooth on the PC also substitutes for a wired serial communications (COM) port. A program, like your C++ program, can open an I/O stream to the COM port and send and receive data from it using standard C++ I/O. You do have to configure the serial port so that the Baud and other features match the EB500's configuration. You could use 9600 Baud, 8 data bits and no parity, but 2400 Baud is more reliable and I'd stick with that for now.

    Read the EB500's documentation thoroughly and look at the sample code provided. Also review the Stamp Manual's chapters on the SERIN and SEROUT statements.

    You mention that your C++ program uses floating point. Remember that the Stamp does not handle floating point. It uses 16-bit integer arithmetic. It would be easiest for your C++ program to convert your floating point values to some kind of meaningful integer values for transmission to the EB500 and Stamp.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-11-25 12:26
    Okay, if you have Bluetooth, it still comes down to what OS you are using in order to determine a serial terminal software.

    I suspect this would be easier in OS X or Linux that some sort of Windows. Your reference to .net seems to imply you are using Windows. Someone else will have to help you with that. And, you will have to compile your C++ in Windows as well.

    In sum, you will be learning a lot in PBasic on the BoeBot side, and a lot in C++ on the Windows side.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2014-11-25 18:16
    A few years back I did quite a bit of work with an EBT including with MSRS and Visual Studio. If you PM me your email address I will zip up all I have and send it to you.
  • GrishmaGrishma Posts: 9
    edited 2014-11-26 16:03
    NWCCTV wrote: »
    A few years back I did quite a bit of work with an EBT including with MSRS and Visual Studio. If you PM me your email address I will zip up all I have and send it to you.

    It's grishma_61@yahoo.com
  • GrishmaGrishma Posts: 9
    edited 2014-11-26 16:05
    Could you please provide me sample code for it. For basic stamp 2 and c++ to solve the problem.
  • GrishmaGrishma Posts: 9
    edited 2014-11-26 16:07
    Mr mike could you please provide a sample code in bs2 and c++ to solve my purpose.?
  • GrishmaGrishma Posts: 9
    edited 2014-11-26 16:09
    Mike Green wrote: »
    As far as the BoeBot is concerned, the EB500 acts as a substitute for a wired serial connection. You'd use the SERIN statement to receive data and the SEROUT statement to send data. The Stamp doesn't care what's on the other end.

    Your in-built Bluetooth on the PC also substitutes for a wired serial communications (COM) port. A program, like your C++ program, can open an I/O stream to the COM port and send and receive data from it using standard C++ I/O. You do have to configure the serial port so that the Baud and other features match the EB500's configuration. You could use 9600 Baud, 8 data bits and no parity, but 2400 Baud is more reliable and I'd stick with that for now.

    Read the EB500's documentation thoroughly and look at the sample code provided. Also review the Stamp Manual's chapters on the SERIN and SEROUT statements.

    You mention that your C++ program uses floating point. Remember that the Stamp does not handle floating point. It uses 16-bit integer arithmetic. It would be easiest for your C++ program to convert your floating point values to some kind of meaningful integer values for transmission to the EB500 and Stamp.
    Could you plz provide me a sample code in bs2 in c++ to solve my problem?
  • PublisonPublison Posts: 12,366
    edited 2014-11-26 16:26
    The EB500 has not been sold for a while and is a product that was not produced by Parallax.

    All of the data avalable is at:

    http://www.parallax.com/search?search_api_views_fulltext=EB500

    You will have to write the C++ for the PC.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2014-11-26 16:42
    Grishma wrote: »
    Could you please provide me sample code for it. For basic stamp 2 and c++ to solve the problem.
    It may take a day or two for me to get everything together. I do not have C++ code but C#. and possibly just C. Like I said, it has been a while since I did anything with it. What is the max file size you are allowed to receive on Yahoo so I do not go over?
Sign In or Register to comment.