import Devices.mTaskDevice
import iTasks._Framework.Serialization
+pinShare :: Main (ByteCode () Stmt)
+pinShare = sds \p=True In {main =
+ d0 =. p :. noOp
+ }
+
+faculty :: Int -> Main (ByteCode () Stmt)
+faculty i = sds \y=i In sds \x=1 In {main =
+ IF (y <=. lit 1) (
+ pub x :. retrn
+ ) (
+ x =. x *. y :.
+ y =. y -. lit 1
+ )}
+
count :: Main (ByteCode () Stmt)
count = sds \x=0 In {main = x =. x +. lit 1 :. pub x :. noOp}
ledtOff d = {main = ledOff (lit d) :. noOp}
readDPin :: DigitalPin -> Main (ByteCode () Stmt)
-readDPin d = sds \pin=False In {main=pin =. digitalRead d :. noOp}
+readDPin d = sds \pin=False In {main=pin =. digitalRead d :. pub pin :. noOp}
ledSelection :: Task UserLED
ledSelection = enterInformation "Select LED" []
,("blink", ledSelection @ blink)
,("blinkShare", treturn blinkShare)
,("count", treturn count)
+ ,("faculty", enterInformation "Faculty" [] @ faculty)
+ ,("pinShare", treturn pinShare)
]