View init.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lighton=0 | |
pin=4 | |
gpio.mode(pin,gpio.OUTPUT) | |
tmr.alarm(1,2000,1,function() | |
if lighton==0 then | |
lighton=1 | |
gpio.write(pin,gpio.HIGH) | |
else | |
lighton=0 | |
gpio.write(pin,gpio.LOW) |
View init.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wifi.setmode(wifi.STATION) | |
wifi.sta.config("YOUR_NETWORK_NAME","YOUR_NETWORK_PASSWORD") | |
print(wifi.sta.getip()) | |
led1 = 3 | |
led2 = 4 | |
gpio.mode(led1, gpio.OUTPUT) | |
gpio.mode(led2, gpio.OUTPUT) | |
srv=net.createServer(net.TCP) | |
srv:listen(80,function(conn) | |
conn:on("receive", function(client,request) |
View led.ino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$( ".navicon" ).click(function() { | |
$( "#menu" ).slideToggle( "medium", function() { | |
// Animation complete. | |
}); | |
}); | |
}); | |
$(document).ready(function(){ | |
$('.navicon').toggle(function () { |
View Piscar_LED.ino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Tutorial Arduino #1 - Piscar LED | |
Criado por Rui Santos | |
Tutorial Completo em: | |
http://randomnerdtutorials.com/pt | |
*/ | |
// Pino 13 esta conetado a um LED. (em quase todas as placas) |