Shop OBEX P1 Docs P2 Docs Learn Events
Can a BS2 record the variable in RCTIME? — Parallax Forums

Can a BS2 record the variable in RCTIME?

IguanaIguana Posts: 2
edited 2005-04-28 15:40 in BASIC Stamp
I was wondering if there is a way to record the movements on a potentiometer and then play them back on a servo? ie, not directly controlling the servo with the pot.

Also, can you have multiple servos on a BS2 doing different things? ie some servos starting their routines while others are ending halfway and other complicated things?
How does the hexapod work? Does each servo on the hexapod do the exact same thing at the exact time on 3 legs at a time

I'm pretty sure the answer to my second question·is no but I figured I will ask.

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-28 05:02
    Hello,

    ·· Yes you could record your POT movements for later playback to servos, but it would chew up a considerable chunk of EEPROM depending on how often you sample the POT position.· Since you're moving servos, you wouldn't really need fine resolution, and could use a fairly low resolution.· It would involve sampling the POT value via RCTIME or via an ADC and storing the values to EEPROM.· It would be possible to get this data to the computer via the programming port so that it could be intergrated into hard DATA statements later for playback.

    ·· As for the second question, the GAIT (Way the Hexapod walks) can be done in several ways.· I would suggest checking out sample code for the Hex Crawler.· Especially watching the Video clips.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • IguanaIguana Posts: 2
    edited 2005-04-28 06:09
    I'm pretty new to programming so this will take a some research and time.

    Would low resolutions make the servos jittery? Would it just be easier to do a bunch of ramp ups and downs to get more relaxed and organic looking movements from servos?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-28 15:40
    Hello,

    ·· Jittering would probably only be caused if the direction of the servo direction was changing before it reached the current position.· But as long as the servo is being refreshed properly, each time it gets a new position command it will simply try working toward that new position.· Of course ramping may or may not help, depending on the gait style you use.· It certainly couldn't hurt.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.