Shop OBEX P1 Docs P2 Docs Learn Events
NEED HELP with StampBug 2 kit (#5-953) — Parallax Forums

NEED HELP with StampBug 2 kit (#5-953)

RYAN'S dISTRICTRYAN'S dISTRICT Posts: 12
edited 2006-05-04 20:33 in General Discussion
hello i just had StampBug 2 kit (#5-953) on my birthday
i built the bug i uploaded the software ( code) from my pc on it and it started walking

but please can you modify for me the default code ( or a new one) so that i make it do anything other than walking in that manner
it can be dancing making tricks and such stuff or a nice walking way

Please help me guys

Comments

  • A.C. fishingA.C. fishing Posts: 262
    edited 2006-05-03 20:56
    Is there an online website about this StampBug? I have never heard of it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    Somebody said...
    -Never Underestimate the power of human stupidity.
    ·
  • RYAN'S dISTRICTRYAN'S dISTRICT Posts: 12
    edited 2006-05-03 20:58
    donno its from u guys but
    plz help me
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-05-03 21:21
    Stamp bug is a Milford Instruments product, a Parallax distributor. http://www.milinst.com/


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1+1=10
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-05-03 21:22
    Parallax does not [noparse][[/noparse]currently] make anything called StampBug. Are their any other labels on it? Can you upload a photo?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-05-03 21:31
    The Stampbug 2 was made by Milford Instruments in England.
    (http://www.milinst.com )

    It's a Hexapod-type(6-legged) robot with an OEM BS2 built into it, if I'm not mistaken.

    While I doubt Parallax is supporting it, the PBasic manuals downloadable from Parallax and all their other freebies should still be valid for the StampBug.

    So, I'll just congratulate you on taking the first step on the road to learning to program, then point you to these pages:

    http://www.parallax.com/html_pages/downloads/basicstamps/documentation_basic_stamp.asp
    Here you download the Basic Stamp Manual.

    http://www.parallax.com/html_pages/downloads/software/software_basic_stamp.asp
    Here you download the latest version of the Editor.

    http://www.parallax.com/html_pages/downloads/sw/sw.asp
    And the StampWorks documents will also teach you a lot.

    And finally, you should hang out in the 'Robotics' part of the forum here.

    For others interested in how it looks and the program listing,
    http://www.robotwinkel.nl/pdf/Manuals/Lopende_Robots/bug2.pdf
    That is the User manual.

    Isn't Google fun? smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • RYAN'S dISTRICTRYAN'S dISTRICT Posts: 12
    edited 2006-05-04 15:27
    thx dude that what i mean
    Please can u tell me weather there is a style of moving that bug other than normal walking by useing the code with the floppy disk that i had with the bug or i can be creative in the bug moves

    If there is premade codes ( other than walking) that will be great if u give me a link where i can find them
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-05-04 15:44
    I'm afraid that without seeing the program that was included with the robot, there's very little we can do to help you as according to the documentation, it has some sort of dedicated co-processor for handling the servo-movements.

    The commands needed to change how it walks should be in the program source.
    Could you post it as an attachment here?
    (but don't paste it into a post. It'll jsut end up garbled)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • RYAN'S dISTRICTRYAN'S dISTRICT Posts: 12
    edited 2006-05-04 15:53
    ok i atatched it
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-05-04 17:54
    Great!

    The trick here is the subroutines. Lets take a look at 'forward':

    forwards:                'walk one step forwards- provide gait, lift, speed
        high right_eye:low left_eye
        servo=middle
        serout tx\flow,baud,[noparse][[/noparse]command,midptm-lift]
        gosub finished        'wait for weight to shift
    
    



    Here it orders it to move the middle servo, then calls a subrutine, 'finished', to wait for it to finish that movement.

        servo=right
        serout tx\flow,baud,[noparse][[/noparse]command,midptr+gait]
        servo=left
        serout tx\flow,baud,[noparse][[/noparse]command,midptl+gait]
        gosub finished
    
    



    And now it ordered the other two servos to move, then wait for it to finish.

        low right_eye:high left_eye
        servo=middle
        serout tx\flow,baud,[noparse][[/noparse]command,midptm+lift]
        gosub finished        'time for weight to shift
        servo=right
        serout tx\flow,baud,[noparse][[/noparse]command,midptr-gait]
        servo=left
        serout tx\flow,baud,[noparse][[/noparse]command,midptl-gait]
        gosub finished
        return
    
    



    Another set of servo movements.
    If you want to see more clearly what they do, insert a PAUSE command in the places where I broke up the code.
    If you want it to walk with a different gait you'll need to change the order and direction the servos move. (It probably moves in the optimal gait already, though)

    Also, the 'finished' rutine checks the feelers to see if they are touching something, and if so decides whether or not to call one of the other rutines.

    The easiest changes that can be done is to set the speed to something else, which can be done by setting the 'speed' variable either higher or lower(a max of 15).

    Changes that can be done in the 'finished' rutine, f.example, is to add a photodiode to the system, then add a test in this rutine.
    Then you could make it speed up in strong light, and slow down in low light/darkness?

    But before you do that I suggest you read the documents I pointed you towards.
    Just be careful not to use I/O-pins 0 to 7 when you experiment, as these are already taken by the servo controls.

    And of course, 'make haste slowly'.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • RYAN'S dISTRICTRYAN'S dISTRICT Posts: 12
    edited 2006-05-04 18:19
    what do u mean by "Just be careful not to use I/O-pins 0 to 7 when you experiment, as these are already taken by the servo controls.
    "
    and where can i change the speed ?
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-05-04 18:34
    If you do anything to those pins you might start the servos moving unintentionally.

    To set another speed, see this piece of code in the first third of the source code:

    start:                'Normal motion
        feeler_flag=1        'arm feelers
        speed=6            'set to moderate speed 
        gosub forwards        'start by moving forwards
        goto start            'repeat until something happens
    
    



    Also, the 'feeler_flag' variable...
    If it's set to '0' it will ignore the sensors and just barge on like a pint-sized ramrod...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • RYAN'S dISTRICTRYAN'S dISTRICT Posts: 12
    edited 2006-05-04 18:45
    editing the code in anyway will it cause any hardware damage for the bug ? cuz i want to learn its langauge on trail and error
    i installed the default code now i use the softeware and click run and it will overwrite the data on the bug ?
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-05-04 20:15
    Very little you do can do physical damage to the hardware.
    It's just that you may not want it to suddenly jump across the table when you were trying to get a LED to blink...

    Yes, using RUN on the PC will overwrite the data on the bug.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • RYAN'S dISTRICTRYAN'S dISTRICT Posts: 12
    edited 2006-05-04 20:29
    by the way can u give me tricks such as the speed trick
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-05-04 20:33
    I already did.
    I told you which variable to change, and even posted the section of code where you should do it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
Sign In or Register to comment.