Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Emaly
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Emaly

    @Emaly

    0
    Reputation
    5
    Posts
    346
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Emaly Follow

    Best posts made by Emaly

    This user hasn't posted anything yet.

    Latest posts made by Emaly

    • LED On & OFF Problem

      Hi All.
      my code doesn't work i don't know why what is the problem can some one help me please many thanks for your help. using ESP12E with Lua.

      wifi.setmode(wifi.STATION)
      wifi.sta.config("SSID","PASS")

      print(wifi.sta.getip())
      gpio.mode(2, gpio.OUTPUT)

      srv = net.createServer(net.TCP, 1)
      srv:listen(80,function(conn)
      conn:on("receive", function(conn,request)

          local buf = "";
          local _, _, method, path, vars = string.find(request, "([A-Z]+) (.+)?(.+) HTTP");
          if(method == nil)then
              _, _, method, path = string.find(request, "([A-Z]+) (.+) HTTP");
          end
          
          local _GET = {}
          if (vars ~= nil)then
              for k, v in string.gmatch(vars, "(%w+)=(%w+)&*") do
                  _GET[k] = v
              end
          end
      
          --print (_GET)
          
          buf = buf.."<h1> Web Server 87</h1>";
          buf = buf.."<p>LIGHT  <a href=\"?pin=ON\"><button>ON</button></a>&nbsp;<a href=\"?pin=OFF\"><button>OFF</button></a></p>";
      
          local _on,_off = "",""
          
          
          conn:send(buf);
          print(_GET.pin)
          print('Pin 2 is:' .. gpio.read(2))
          action(_GET.pin)
      
         
      end)
      conn:on("sent",function(conn) conn:close() end)
      

      end)
      function action(param)

          gpio.write(2, gpio.HIGH);
      elseif(param == "OFF" ) then
        
          gpio.write(2, gpio.LOW);
      end
      

      end

      posted in My Project
      Emaly
      Emaly
    • RE: Controlling central heating, TV, lights and boiler over the internet

      @alexsh1 Many thanks Alexsh1 , I'm using ESP8266 chip with Arduino

      posted in My Project
      Emaly
      Emaly
    • RE: Controlling central heating, TV, lights and boiler over the internet

      @SiLeX many thanks that will be useful

      posted in My Project
      Emaly
      Emaly
    • Controlling central heating, TV, lights and boiler over the internet

      Controlling central heating and boiler over the internet

      Hi all,

      I have a plan to create the project for my home winch is( Controlling central heating and boiler over the internet) actually I have some idea but not much more and enough, form here I need to someone to help me how can I start ? what do I need ? any chips or code ? many thanks for your help and support xxx

      posted in My Project
      Emaly
      Emaly