Shop OBEX P1 Docs P2 Docs Learn Events
communication between basic stamp, and C++ — Parallax Forums

communication between basic stamp, and C++

polymerpolymer Posts: 4
edited 2007-04-13 05:47 in General Discussion
Hey! I am doing a project for school where a wiimote can act as an input device for the basic stamp, I thought I could do this by connecting to the wiimote with C++ and then have C++ address the values into memory, which then the basic stamp could access. I don't know if this is possible, but I am hopeful considering it can send debug information back to the PC. If there is anybody who has enough experience to tell me whether this will work or not, I would appreciate some help [noparse]:)[/noparse].

Comments

  • polymerpolymer Posts: 4
    edited 2007-04-04 03:57
    I'm not getting any replies :/ . Is it possible to connect the basic stamp to your PC, and take information from the PC for purposes other then compiling?
  • Mike GreenMike Green Posts: 23,101
    edited 2007-04-04 04:09
    The Stamp cannot "take" information from the PC. A PC program can take information it has available and transmit it to a Stamp via a serial port. Exactly how to do this (from the PC side) is beyond the scope of these forums. Have a look at Stamp Plot Pro (here: www.selmaware.com/) for one example of a PC program that communicates extensively with a Stamp and provides a mechanism for a Stamp to record data it collects.
  • QuattroRS4QuattroRS4 Posts: 916
    edited 2007-04-04 04:11
    see 'Writing to text files' - in the Basic Stamp Thread

    This is a HTML Logger logging in/out serial activity - you can have the stamp waiting for serial data (serin) - this can be sent from this application - assuming the stamp is programmed to react to the string - it carries out whatever you set it to do .. it can then send back (serout) a confirmation string to say action was completed - all transactions both tx and rx are logged in a html file...


    http://forums.parallax.com/showthread.php?p=640960

    and a link to latest version ... of this program

    http://forums.parallax.com/attachment.php?attachmentid=46405

    let me know if it fits the bill ....

    Regards,
    Quattro

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Necessity is the mother of invention'

    Post Edited (QuattroRS4) : 4/4/2007 4:18:56 AM GMT
  • polymerpolymer Posts: 4
    edited 2007-04-04 05:08
    Thanks! This is a good start, I can do something in class tomorrow [noparse]:D[/noparse]. At any rate, it looks like I'll be using the serin for this. If there are anymore resources people are willing to post, I'll gladly accept it. For now these should help me. Thank you. [noparse]:)[/noparse]
  • QuattroRS4QuattroRS4 Posts: 916
    edited 2007-04-04 05:13
    No problem .... post a bit of feedback..

    Regards,
    Quattro

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Necessity is the mother of invention'
  • polymerpolymer Posts: 4
    edited 2007-04-13 05:18
    Okay, I know how to use the simple program to send a string, how would I program the basic stamp so that it notices it?, I'm thinking I am going to make it increment the value X or something for each X that gets sent to it. I'll play with this, if you have any simple coding advice/tips I would appreciate it [noparse]:)[/noparse].

    Post Edited (polymer) : 4/13/2007 5:46:09 AM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2007-04-13 05:45
    If you have a program in C++ that runs on a PC and somehow gets data from a wiimote, you can open a serial port from C++ and transmit the data to a Stamp over the serial port as text strings. The Stamp can receive and interpret the strings using SERIN or DEBUGIN statements. If you write the C++ program to allow it, the Stamp could request data from the C++ program using commands much like the sort of thing that StampPlotPro does. Have a look at the StampPlotPro tutorials. They would show you the sort of thing that can be done and what the information going back and forth might look like.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-04-13 05:47
    The StampPlotPro tutorials have examples from the Stamp side that show what statements are needed to send a "command" to the PC side and to interpret the information coming back.
Sign In or Register to comment.