diff options
author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2017-02-20 20:14:38 +0100 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2017-02-20 20:14:38 +0100 |
commit | 8d4be06944866d6d8a2dddff16025f590b03765d (patch) | |
tree | 99e4c41f7a779960ce4a4a3d83ccbfc3271202dc /code/002-button.js | |
parent | a58d3bc6761f94308cd1e21ba29c7d746ba15939 (diff) |
Some slides
Diffstat (limited to 'code/002-button.js')
-rw-r--r-- | code/002-button.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/code/002-button.js b/code/002-button.js new file mode 100644 index 0000000..e98ace2 --- /dev/null +++ b/code/002-button.js @@ -0,0 +1,7 @@ +var on = false; +var change = function() { + on = !on; + LED1.write(on); + }; + +setWatch(change, BTN1, {repeat:true, edge:"rising"});
\ No newline at end of file |