Shop OBEX P1 Docs P2 Docs Learn Events
Internal clock in the sumo-bot — Parallax Forums

Internal clock in the sumo-bot

JuergJuerg Posts: 3
edited 2009-06-07 20:10 in Robotics
cool.gif
The sumo competition rules in Switzerland·say that after 85 seconds the sumo roboter has to stand still, i.e. to shut itself down.
I hope that somebody has a good idea how to program an internal clock in the sumo's basic wrestler program.

Thanks for any help

Juerg

Comments

  • FranklinFranklin Posts: 4,747
    edited 2009-06-06 23:08
    If all it needs to do is stop and not move again you could build a simple timer with a 555 chip that would remove power after the set time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • JuergJuerg Posts: 3
    edited 2009-06-07 08:57
    Stephen

    thank you for the idea.

    Perhaps you see a different approach without a 555-chip.
    Actually I only want to implement a couple of program steps, something like a "GOSUB".
    On the other hand, I've never programmed a 555-timer-chip and that's why I don't have a clue how to do it.

    Juerg
  • Mike GreenMike Green Posts: 23,101
    edited 2009-06-07 13:35
    1) You do not program a 555 timer. This chip works by charging or discharging a capacitor through a resistor and detecting when the voltage across the capacitor rises above or drops below a fixed threshold. Do a websearch for "555 timer" to find datasheets and many sample designs.

    2) The Stamp used in the Sumo-Bot does not have an internal clock. It does have an internal oscillator and uses that for determining timing for statements like PULSOUT and PAUSE, but there's no cumulative time unless you build it into your program.
  • JuergJuerg Posts: 3
    edited 2009-06-07 20:10
    Mike
    Thank you for all of that.
    I'm going to give it a try with the NE555.

    Juerg
Sign In or Register to comment.