Git Product home page Git Product logo

esp8266-co-uk's People

Contributors

paulcuth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp8266-co-uk's Issues

Does your debounce have an issue with tmr.now() rollover?

Your debounce code at https://github.com/hackhitchin/esp8266-co-uk/blob/master/tutorials/introduction-to-gpio-api.md was (indirectly) discussed at http://www.esp8266.com/viewtopic.php?f=24&t=4833&start=5#p29127. It essentially says

tmr.now() rolls over at 2147 seconds - the NodeMCU API page indicates uint31, not uint32, which means it wraps to zero when it reaches the max value for int32. The value (now - last) will be negative when (last) gets really big and (now) wraps around.

And it goes on to propose adding if delta < 0 then delta = delta + 2147483647 end; as a remedy.

-> https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en#tmrnow

device not connect to esp8266 in ap mode

wifi.setmode(wifi.SOFTAP)
-----------------------------------------------------------------------------
print("Starting Web Server...")
-- Create a server object with 30 second timeout
srv = net.createServer(net.TCP, 80)

-- server listen on 80, 
    srv:listen ( 80,function(conn) 
    conn:on( "receive",function(conn,payload)
        if(receive_flag ~= true ) then
            decode(payload)
            conn:send(ack_data)
            ack_data="nope";
        else

            file.open("frame/data.rin","w")
            file.writeline(payload);
            file.close();
            conn:send("FR complete");
            receive_flag = false;
        end
    end)     
end)

while true do

  file.open("frame/data.rin","r")
  file.readline();
  file.close();
  if(new == true ) then
  --print("r")

        todmd();  --

 else
  gpio_toggle(j)
    if(j==3)then
        j=0;

        if(c==60) then
        c=0;
        new = true;
        else
        c=c+4;
        end
    else
     j=j+1;
    end  
  end
  tmr.wdclr()

end
function todmd()

    for row=0,3,1 do
              gpio_toggle(row)
              spi.send(1,0xf0,0xf0,0xf0,0xf0,0xf0,0xf1,0xf1,0xf1,0xf1,0xf1,0xf1,0xf1,0xf1,0xf1,0xf1,0xf1)
              gpio.write(6, gpio.LOW) 
              gpio.write(6, gpio.HIGH)
              gpio.write(6, gpio.LOW) 
              tmr.wdclr()

    end

end
while running the above code the mobile not connected to esp8266 ,when i remove the while loop
there is no problem to connect devices. what is the actual problem here i cant fix it ,i try different firmware but the result is same. any solution to solve this

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.