Shop OBEX P1 Docs P2 Docs Learn Events
How to use 2 Basic Stamps on one robot? — Parallax Forums

How to use 2 Basic Stamps on one robot?

roksrakaroksraka Posts: 19
edited 2008-09-30 10:46 in Robotics
Hi, there!

I've been searching the for quite some time now and I can't find any help... Does any of you know, how to do it - how to have to BSs on one robot? I know it can be done, but I don't know how!
If you know anything, please reply!

roksraka

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-23 19:34
    Why do you want more than one BS2 on a robot? Are they dividing up tasks?
    If so, how do you want them to communicate? What tasks are they?

    The problem with your question is that there are lots of answers.
    Which one to choose depends on what you want to do.

    In the Basic Stamp Manual, there's an example of hooking two or more Stamps into a network.
    Look in the chapter on the SEROUT statement.

    There's a pair of Nuts and Volts Columns on networking Stamps.
    Look through the index of Nuts and Volts Columns for the specific column #s.
  • SRLMSRLM Posts: 5,045
    edited 2008-09-23 19:55
    I'm working on a bot right now with a BS2 and a BS2px to do the control. The BS2 collects sensor information and stores it to an external EEPROM. The BS2px then reads the same EEPROM, computes what to do, and sets the motors to do so. I chose the EEPROM solution (instead of the Serin/Serout) because I didn't want to have to force a BS2 to wait for the other to be ready. Seems to work well.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-09-23 20:17
    SRLM -

    Unless you're not telling us everything, you have no synchronicity between the two Stamps which SERIN/SEROUT would have given you. What this means is that the data fielded by the BS2px may not be the freshest data available, just the most recently recorded. I don't know if that makes any difference to you, but it's something to keep in mind.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When all else fails, try inserting a new battery.
  • SRLMSRLM Posts: 5,045
    edited 2008-09-24 04:32
    I have the slave BS2 in a loop, getting one set of data, recording it, getting the next, and so on. When the BS2px needs to read the data, it pulls an external line high, then waits for the line to be pulled low by the BS2. When that happens, it reads the EEPROM of all the data and stores it to the SCRAM. It then pulls the line high and goes on it's way. The BS2 pulls the line low, and continues on with the data recording.

    True, the data may be up to 100 ms old, but since this is part of the real world (and hence moves in time increments of seconds) I'm not to worried about it. I'd be worried with serout and serin since the BS2 may send it at the wrong time, and do so often. Plus, I don't like to keep things waiting (as would be the case).

    In short, I think it's a more elegant and reliable solution than serial. (so there!)

    Edit: I'm far from done with debugging, but the comunication is not the problem (it's the usb datalogger that is causing the most problems)
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-09-24 15:37
    Bill Chennault has a robot that uses 5 microcontrollers and could probably tell you some of his experiences. Here are a few of the threads pertaining to his, “Ugly Buster”.

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

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

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

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • vrossivrossi Posts: 38
    edited 2008-09-30 10:46
    Hey, Roksraka,

    Maybe this can be helpful for you:

    http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol3/col/nv81.pdf
Sign In or Register to comment.