Stopping program after certain time.

James Venning

New Member
Hi All,

As part of my project I'm working on, I need my program to stop after 29 seconds. Is there some way I can program the picaxe (18x) so it's something like this:

while timer < 29 seconds

run the rest of my program

then stop all outputs

Is that possible?
 

eclectic

Moderator
James.

Can you post your program please?

Then someone can suggest the best method for timing.
(There are several ways to do it).
e.
 

James Venning

New Member
The program doesn't exist as yet. When it's done it will be various actions that are trigged by what happens on a few distance sensors...
 

moxhamj

New Member
pseudo code:
start:b13=0
do
Code:
  pause 1000' pause a second
  if b13>=29 then end' stop forever
  b13=b13+1
loop


But ending a program forever may not be great - perhaps at least flash a led or something when it ends otherwise it is hard to tell an "ended" program from a zapped chip.
 
Top