Shop OBEX P1 Docs P2 Docs Learn Events
how to restrict a "do loop" to run for a several certain interval or collect th — Parallax Forums

how to restrict a "do loop" to run for a several certain interval or collect th

jason0324jason0324 Posts: 6
edited 2009-04-11 12:26 in BASIC Stamp
I·am doing a project and need to meaure the average value of·a·quantity in·given period(say , 1min) using BS2.
Instead·using the command "count", i collect the quantity with "button".
But i can't collect the time used

I would like to ask if there has another command related to the time used, or retricted the time of a do-loop
Alternatively, it would be grateful if there has another path to collect the rate.


Post Edited (jason0324) : 4/11/2009 6:44:08 AM GMT

Comments

  • AmaralAmaral Posts: 176
    edited 2009-04-11 12:26
    Nope .. To restrict an LOOP by time without an external TIMED signal is not possible.

    You can aproach this result by knoing the time of each iteraction but if you have a timed command inside this loop, like PULSIN the thing is just impredictible.

    maybe there´s a better way to do that .. what kind of event are you trying to get the frequency ?

    Amaral
Sign In or Register to comment.