Shop OBEX P1 Docs P2 Docs Learn Events
sending data to pc over a serial to usb cable — Parallax Forums

sending data to pc over a serial to usb cable

nemesiswesnemesiswes Posts: 17
edited 2008-12-11 22:24 in BASIC Stamp
how can you you send data to the pc over usb, i just need to send data that the compass outputs and then send that to a program on the pc????

thanks for any help

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-01 20:58
    I assume you're planning on using the programming port, normally used with the Stamp Editor. The DEBUG statement will send data to the PC over this programming port. You can also use the SEROUT statement with pin # 16 (which doesn't really exist, but designates the programming port). Read the chapters in the Stamp Manual on these statements for details.

    On the PC, you'll need a program to open the serial port and read the data you send to it. Have a look at StampPlot Pro (www.parallax.com/tabid/441/Default.aspx) which can write received data to a log file for processing later.
  • GeorgeLGeorgeL Posts: 131
    edited 2008-12-02 04:57
    If your looking for a way to communicate with the computer through a app other then the DEBUG window, then read this link:
    http://www.rentron.com/sending_data.htm


    this is for vb6 (in my opinion easier to use) but if you download the example, open it with VB 08 or 05 express and it will convert it for you.
  • nemesiswesnemesiswes Posts: 17
    edited 2008-12-11 20:35
    thx i have been able to do it c# but i have to keep clicking a button, lol i want it to constantly and i have tried doing it in c++ but i cant get it to read any data


    thx for the answers though
  • MSDTechMSDTech Posts: 342
    edited 2008-12-11 22:24
    If you don't mind a little extra formating, I use PLX-DAQ Real-Time Data Acquisition for Microsoft Excel, which you can find on the downloads page at:
    http://www.parallax.com/Portals/0/Downloads/sw/plx_daq_install.zip
    This allows you to read the data directly into Excel and was designed to work over a serial connection. A typical command to send data would look like:
    ··········· SEROUT BT_TX,84,[noparse][[/noparse]"DATA,TIME,Scanning,",
    ··········· DEC Ping_Position,",",DEC Heading,",",
    ··········· DEC Bearing,",",DEC Max_Range,",",
    ··········· DEC Range,",",BIN Obsticle,",",
    ··········· SDEC x,",",SDEC y, CR]
    The DATA keyword begins the transfer and is required.
    The TIME keyword loads the first column with the PC's time.
    The remaining comma separated items in the set demark either text to put in a column (eg "Scanning" as shown above, or formatted data.
    The above example was from my robot and was sending among other things data from the compass module.
Sign In or Register to comment.