X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=Tasks%2FExamples.icl;h=103862c36eb20d6b31874bd10382d9529b3e4210;hb=59c7c761163b0cc5215563644ca60e2a47b9c9a9;hp=94042747b4c57a608de6529d008369aca71315bd;hpb=639cdcf1c26177c87237bd5790e89184f531731d;p=mTask.git diff --git a/Tasks/Examples.icl b/Tasks/Examples.icl index 9404274..103862c 100644 --- a/Tasks/Examples.icl +++ b/Tasks/Examples.icl @@ -6,6 +6,9 @@ import mTask import Devices.mTaskDevice import iTasks._Framework.Serialization +count :: Main (ByteCode () Stmt) +count = sds \x=0 In {main = x =. x +. lit 1 :. pub x :. noOp} + countAndLed :: Main (ByteCode () Stmt) countAndLed = sds \x=1 In sds \pinnetje=1 In {main = IF (digitalRead D3) ( @@ -63,4 +66,5 @@ allmTasks = 'DM'.fromList ,("readDPin", pinSelection @ readDPin) ,("blink", ledSelection @ blink) ,("blinkShare", treturn blinkShare) + ,("count", treturn count) ]