Shop OBEX P1 Docs P2 Docs Learn Events
How to extract time? — Parallax Forums

How to extract time?

WGXWGX Posts: 3
edited 2009-11-22 07:26 in Robotics
Hi,

I am currently using a Boe-Bot with·BS2sx microcontroller. I need to calculate the point to point·velocity using distance/time.
I am able to calculate the distance using a localizer. Due to the localizer, the encoders are not used.
However, I am facing a problem with the time information.

Usually, there is·an internal clock in a·microcontroller.

Is there any relevant function or command to extract the time taken·for the Boe-Bot to travel from one point to another?

Thanks




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

Comments

  • Steve NelickSteve Nelick Posts: 25
    edited 2009-01-30 13:39
    What's a localizer? After I saw your message, I·searched for localizer on Google and it came up with a Wikipedia article on Instrument Landing Systems (ILS).

    Did you build the localizer or buy it? I'd like to have a localizer.

    I'm using the Propeller on my robot. For the Propeller you calculate time with the System Counter register named cnt.
  • SRLMSRLM Posts: 5,045
    edited 2009-01-30 15:56
    The BS2 series does not have an accessible clock that your code can access. You have to fake it by using constant time loops and incrementing a counter.
  • P!-RoP!-Ro Posts: 1,189
    edited 2009-01-31 02:42
    You might be able to use something like the 555 timer to count the time it takes. I've never tried it, though.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PG
  • Jeena99Jeena99 Posts: 14
    edited 2009-11-22 07:24
    Hi I am doing the same prject using the same robot and micrcontrller.
    WGX Can you tell me what you have achieved so far?
  • Jeena99Jeena99 Posts: 14
    edited 2009-11-22 07:26
    Hi I am doing the same prject using the same robot and micrcontrller.
    WGX Can you tell me what you have achieved so far?
Sign In or Register to comment.