17 lines
228 B
Text
17 lines
228 B
Text
|
open Arduinolib
|
||
|
|
||
|
node button (bpin, ledpin : int) returns ()
|
||
|
var value : int;
|
||
|
i : int;
|
||
|
let
|
||
|
i = 0 fby (i+1);
|
||
|
value = dread(bpin);
|
||
|
() = dwrite((ledpin, value));
|
||
|
tel
|
||
|
|
||
|
node main() returns ()
|
||
|
let
|
||
|
() = button(8, 13);
|
||
|
tel
|
||
|
|