Shop OBEX P1 Docs P2 Docs Learn Events
USB>Xbee — Parallax Forums

USB>Xbee

T ChapT Chap Posts: 4,223
edited 2006-10-21 22:29 in General Discussion
Hey how would you guys get from USB to Xbee? Is the FTDI chip the route to look into? Ideally, I want to get from OSX and PC to the Xbee. Both directions preferred, but at least Tx from the computers to the Xbee is required.

Second, what is the simplest easiest way to write apps for the PC and OSX to send out simple strings? I have heard that Visual Basic is good. For OSX I am clueless. I want a simple app with graphics, a few buttons that can be programmed like using any micro, for example:

Press an up button on the app, the button has a counter that it updates, sends out the new count to the Xbee. PRess down button, the counter decrements, sends out the new value. This happens for around 8 buttons. Ideally, the Xbee on the Rx side sends back a confirmation. If the app doesn't get the confirmation in X time, Resend until confirmed.

The concept is a box that sits within USB cable distance from the computer, the computer s controlling motors in other places via Xbee. The motor gets byte %00001111 for example, moves stepper 1 to x position.

Post Edited (originator99) : 10/18/2006 7:25:33 PM GMT

Comments

  • Tom WalkerTom Walker Posts: 509
    edited 2006-10-18 20:37
    I would say the "easiest" way would be SelmaWare's XBee product line. App notes are on site to hook one up (XBee SIP would probably be the easiest) to a PC with minimal additional hardware (power supply and USB2SER).

    Since the USB2SER presents as a serial port, any method for communicating to a serial port can be used on the PC (VB, Delphi, C#, QBASIC, HyperTerm, etc...)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • T ChapT Chap Posts: 4,223
    edited 2006-10-19 03:40
    Thanks Tom. I already have the Maxstream XbeePros stick on hand. Using them i a breeze, just trying to see the best method for USB to th Xbee. Your suggestion of the USB2Ser adapter is nice. I was hoping for more of an IC to use on my board, whatever the USB to SER uses. I thought the FTDI chips did the same thing, but have never dug into it.
  • Tom WalkerTom Walker Posts: 509
    edited 2006-10-19 13:26
    The USB2SER does use the FTDI chip, so that way would seem very possible...I was just relaying the "easiest" way to answer question 1.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • T ChapT Chap Posts: 4,223
    edited 2006-10-19 18:06
    Thanks Tom. I was looking through all the FTDI chips on the Parallax site. I need to narrow it down to the right one to get from USB to the Propeller.

    I am refining what needs to happen with the app, maybe I am looking for what the other B poster is wanting as well:

    A graphic representation of a slick interface. This will be a jpg generated by a Photohop guy. I want to generate mousedown versions of the 10 or so buttons, much like in Flash, push the button and it becomes a "pushed in" version graphically. This stuff is simple. What I need to decide is the simple way to assign the buttons to a program residing in OS X and maybe even PC, but first o all OS X. All buttons affect variables, and the values of the variables are constantly sent to the USB/ser/XbeePro, redeived somewhere else by the Xbee/Propeller, and the bytes rec'd tell the Propeller to send one or al of 4 or 5 steppers where to go.

    Second, as an optional choice for moving the motors, I want to be able to drag an icon in X and Y, wherever it lands sends out a bytes of the position, say the string is this, X := %00011111 Y := %11110000 or whatever. There are other motors to dial in, but these are the onces for drag and placed, the other are fne tune with buttons.

    Thee need to be presets to store various positions, that can be named, and scrolled through for recall. I want to save the main file which can contain hundreds of presets.

    The X is the object to drag around.
    ---------------------
    -                        -
    -                        -
    -                        -
    -          X            -
    -                        -
    -                        -
    -                        -
    ---------------------
    
    



    So that is the idea, what software to do it with with the least curve, but nice look for public consumption is what I need to find out. I am studying the Excel Visual Basic that I just learned in is my OS X Excel, although the com maybe not be as simple as MSCOMM, which I just put on, but OS X will not recognize as a file.


    *Just looking through Excel, noticed the Real Basic editor. Although it isn't loaded, looking at the RealBasic.com it sure seems a lot more intuitiove or my purposes, also, the app is claimed to be cross platform, create your app for PC, MAC, Linux.

    Post Edited (originator99) : 10/19/2006 8:10:27 PM GMT
  • T ChapT Chap Posts: 4,223
    edited 2006-10-20 04:52
    This may be the dumbest question ever posted here.

    I havbe been chatting with a real Basic guru, he sent me a realBasic serial test app, so it is simple to get from RB to usb>ser after all.

    I have the Parallax usb2ser adapter. I have a Propstick, SX28's, SXbltz, BS2p40 with demo board. I am at a loss for how to get the adapter into anything for test purposes. I want to test sending some bytes from the RB tutorials to the adapter.

    I already have some SX serialin test programs, some Spin stuff is easy too. The Stamp p40 would be nicer since I can debug on the PC what is rec'd. I don't see a serial in example for the Stamp though. Thanks
  • Mike GreenMike Green Posts: 23,101
    edited 2006-10-20 05:09
    Have you looked at the SERIN section of the PBasic manual? The Stamp will wait forever for serial input to a SERIN statement unless you include a timeout. That's really convenient for testing. Try transmitting a single character from RealBasic first to the Stamp and see what comes across, then try sending some numbers (as ASCII digit strings) and see what the DEC formatting operator does. You'll need a non-numeric delimiter at the end, so use a RETURN character. Once you get stuff going from RealBasic to the Stamp, you can try going the other way with a SEROUT statement.
  • T ChapT Chap Posts: 4,223
    edited 2006-10-20 05:15
    You are saying just leave the usb2ser adapter plugged in the demo connector? I didn't know you could access those pins for Rx. I'll try it.

    Post Edited (originator99) : 10/20/2006 5:23:00 AM GMT
  • T ChapT Chap Posts: 4,223
    edited 2006-10-20 06:01
    It appears that real basic is a nice way to go, spit out your app in either os x, pc, or linux with a click. What I just realized is you can't both send from the Mac to the BS2 demo board and debug on it at the same time! Maybe have set some leds as debug for a specific byte or string, then close out Macbs2, open the RB sertest app, send. Ideally,I'd much prefer to send from the Mac with RB to a different pin(1-15), and debug on the PC laptop. Sort of a brain twister. With only one usb>ser adapter, very unlikely to pull this off.
  • T ChapT Chap Posts: 4,223
    edited 2006-10-20 09:59
    Some success! I sent an "x" from Real Basic to the BS2p40 on a demo board, had it set to flash an LED if it saw an "x", and it worked. I put the Stamp in a loop sending out some text and then binary numbers and it showed up in the serial tester RB app.

    Post Edited (originator99) : 10/20/2006 11:12:22 AM GMT
  • T ChapT Chap Posts: 4,223
    edited 2006-10-21 22:29
    Does anyone know if there is a way to have the USB2Ser adapter show up with a unique name when the system searches for ports? I am creating an app in Real Basic, the first process the app does is looks for the ports available, then from a drop down menu you choose the correct port. The USB2ser is showing as USBserail wjclxxxxxx, I want to list the product name not the jibberish that shows up. Here is the beginning stages of the app that will move a microphone precisely to any of a number amps stacked up in a row, with left right travel, up down, in out, rotation for the mic +-45 Degress, dual 15 amp x 15 cab routing matrix that gets stored in the mic position presets, plus AC power control, auto-muting when in motion. Max travel is 6' high and 10' wide. Motion is dragable with 2D graphic or sliders or buttons. Shown is the very early stages of first attempt at Real Basic, which will build OS X, 9, Windows, Linux apps.

    Post Edited (originator99) : 10/22/2006 6:26:21 AM GMT
    681 x 544 - 96K
Sign In or Register to comment.