[C.CC USERS] [Fwd: Re: Question's]
Fred Barnes
F.R.M.Barnes at kent.ac.uk
Sun Apr 15 18:57:40 BST 2018
Hi Abraham,
a.vreugdenhil at hccnet.nl writes:
> Hello Sergio.
>
> A couple month's ago i buy the book "A tutorial introduction to OCCAM
> programming" from Dick Pountain and David May. But also I read the
> -Plumbing for Arduino- workbook. Now I try to program Occam on the Arduino
> but I have some question's.
> In the little program below, why only the firste LED is blinking and the
> second and last one NOT ??
> It drive's me crazy ?? I try a lot, different type of CHAN between the
> PROC FLIP but I can not understand why only the first LED is blinking.
>
> Mayby someone on the forum have a idee how I can continue my program.
>
> Greeting Abraham Vreugdenhil.
>
>
> #INCLUDE "plumbing.module"
>
> PROC FLIP(CHAN SIGNAL in?, VAL INT pin, CHAN SIGNAL out!)
> CHAN LEVEL g:
> PAR
> toggle (HIGH, in?, g!) -- LED start with HIGH !! -works
> good !!-
> SEQ
> digital.output (pin, g?) -- komt van toggle en zet led aan / uit
> out ! SIGNAL
> :
The SEQ process here runs and then terminates -- so the "out" channel
is written to once and then never again. This perhaps wants to be
in a WHILE TRUE loop or similar.
Hope that helps,
-- Fred
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.concurrency.cc/pipermail/users/attachments/20180415/498d6531/attachment.pgp>
More information about the users
mailing list