Browse Source

Start-project

Federico Bonelli 2 years ago
commit
47c6351c49
2 changed files with 12 additions and 0 deletions
  1. BIN
      IoTplayground-pres.key
  2. 12 0
      Node-MCU/init.lua

BIN
IoTplayground-pres.key


+ 12 - 0
Node-MCU/init.lua

@@ -0,0 +1,12 @@
1
+lighton=0
2
+pin =4
3
+gpio.mode(pin,gpio.OUTPUT)
4
+tmr.alarm(1,200,1,function()
5
+    if lighton==0 then
6
+    lighton=1
7
+    gpio.write(pin,gpio.HIGH)
8
+    else
9
+    lighton=0
10
+    gpio.write(pin,gpio.LOW)
11
+    end
12
+    end)