logo elektroda
logo elektroda
X
logo elektroda

ESP8266 init.lua only works after reset - how to run without reset?

kogiel 939 4
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 16908664
    kogiel
    Level 17  
    Hello
    I have this problem:
    I have uploaded nodemcu_float_0.9.6-dev_20150704 to my esp, then the init.lua program (simple diode flashing) and everything works, but only after a reset of the esp when I unplug and reconnect the chip is silent, only another reset helps what am I doing wrong ? i have tried ripping other softy's but the effect is the same
  • ADVERTISEMENT
  • #2 16908758
    piterek-23
    Level 33  
    This is a technical forum and here we use diagrams, codes, not stories. Show what you have done and how you have done it.
  • ADVERTISEMENT
  • #3 16908845
    kogiel
    Level 17  
    So here goes:
    Program init.lua
    tmr.alarm(0, 200,1, function()
    if (state==0) then
    state = 1
    gpio.write(4, gpio.HIGH)
    else
    state = 0
    gpio.write(4, gpio.LOW)
    end
    end)

    ESP8266 init.lua only works after reset - how to run without reset? .
  • ADVERTISEMENT
  • Helpful post
    #4 16908853
    piterek-23
    Level 33  
    Dump those diodes and connect to 3V3

    Connect everything like this:

    ESP8266 init.lua only works after reset - how to run without reset? .
  • #5 16908876
    kogiel
    Level 17  
    This patent with diodes is not mine, I've seen it once in DVD player, later I've used it many times and it works without any problem, I didn't connect it to 3V3 because FTDI has too small current to power ESP, well, in this case it works too, but only after giving ground pulse to reset
    I will try with these resistors, only I have a question, why to connect GPIO2 to plus ?

    Edit:
    Everything is working :-) the problem turned out to be the 1000uF capacitor, which I added suggesting a post on another forum that ESP in pulse needs a lot of current and supposedly this capacitor was supposed to help, it turned out that after replacing with 220uF everything is OK
    Apparently the ESP doesn't like the slow rise in supply voltage ;-) .
ADVERTISEMENT