PDA

View Full Version : Blink



Andras Kozma
01-03-2005, 07:19 PM
Hi,
Could anyone help me by telling how I could make a variable in PMSystems
'blink' in a 1 sec on, one sec off sequence?

Andras

Enrico Schiratti
01-06-2005, 01:36 PM
Hi,

something like this should do the trick (I used 5 seconds to make it
clearer):

blinkcounter = blinkcounter + elapsed
//increments counter with the amount of time that elapsed since last
check
if blinkcounter > 5 // five seconds elapsed
blinker = 1 - blinker // switches blinker to 1 or 0 respectively
blinkcounter = 0 // resets counter
endif

"blinker" should do this every 5 seconds... 0 1 0 1 0 1 0 1 etc... and would

need an offset of its own

Ciao

Enrico

"Andras Kozma" wrote in message
news:280787.55820@wb.onvix.com...
> Hi,
> Could anyone help me by telling how I could make a variable in PMSystems
> 'blink' in a 1 sec on, one sec off sequence?
>
> Andras
>

Andras Kozma
01-06-2005, 06:24 PM
Hi Enrico,

> "blinker" should do this every 5 seconds... 0 1 0 1 0 1 0 1 etc... and
> would need an offset of its own

That sounds wonderful, many thanks.
But the main question is: how can I define my own offset? Is it possible at
all?

regards
Andras