I've never gone near a compiler before but this IDE is pretty groundbreaking!
Thank you!
Explore... Chat... Share...
print(node.heap())
wifi.setmode(wifi.STATION)
wifi.sta.config("SSID","PASSWORD")
wifi.sta.setip({ip="192.168.178.111",netmask="255.255.255.0",gateway= "192.168.178.1"})
dofile("srv.lua")
function leds()
colors = ""
for key,rgbvalue in pairs(commando.options) do
colors = colors .. string.char(rgbvalue.red, rgbvalue.green, rgbvalue.blue)
end
ws2812.writergb(1, colors)
-- alarm deaktivate the leds because i only want a blink
tmr.alarm(1,750,1,function()
ws2812.writergb(1, string.char(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
tmr.stop(1)
end)
end
srv=net.createServer(net.TCP,10)
srv:listen(80,function(conn)
conn:on("receive",function(conn,payload)
if string.find(payload, "RGB_LED") then
payload = payload:gsub("%%22", '"')
k, command = string.match(payload,"(text1)=(.+)")
command, k = string.match(command,"(.+)( HTTP/1.1)")
print(command)
print(".....")
print(k)
commando = cjson.decode(command)
print (teilstring)
leds()
end
conn:send("<h1>hihodudidedu</h1>")
end)
conn:on("sent",function(conn)
conn:close()
end)
end)
http://192.168.178.111/?text1={"command":"RGB_LED","options":[{"red":255,"green":0,"blue":0},{"red":100,"green":200,"blue":100},{"red":0,"green":255,"blue":100},{"red":150,"green":100,"blue":255}]}
Speshal wrote:
I need to be able to send the light values via an HTTP get ...Code: Select allhttp://192.168.0.17/(0,255, 0):rep(10))'
Thanks in advance and Sorry for the n00b questions
192.168.4.1/~ffff00
andrew melvin wrote:That you guys might be able to provide a library for the new arduino ide...
It takes about 20-25 seconds for home assistant c[…]
I tried to upgrade tof my sonoff basic R2 with the[…]
a problem Perhaps you want to define "Probl[…]
Rebooting your router will not give you a faster I[…]
There are no other notifications from esptool.py i[…]
Using the Arduino IDE, you'll learn how to set up […]
In this project, you will post to Twitter using an[…]
In this project, we will build a water level contr[…]
I guess I'm late, but I had the same problem and f[…]
Last night I received my first D1 Minis for a lear[…]
Although I am aware that this is an old post, I fe[…]