-1

Just after saying farewell to my old broken D1 mini I could not resist myself and bought a brand new nodemcu in the morning. I tried my previous arduino sketches to board and everything works fine, just needed to change the pin setup. I was wondering is it possible to set a default arduino program to nodemcu? such that every time I turn on my Nodemcu 12-E it runs it as a default program. Searching the internet I cam across this link. Downloaded the flasher,selected the port to which 12-E is connected and flashed it. After following all instructions and connecting to AP and 192.168.4.1/edit I tried to setup an arduino code as default code but failed. Is that because original firmware on supports Lua programming language? Is it possible to setup an arduino sketch as a default program? If not is it possible to convert arduino sketch to Lua programming language? as I have zero knowledge of Lua

9
  • 3
    What do you mean by "default" program to run? The NodeMCU only runs one program, and that is the program that you flashed to it. If you want it to run a different program then flash a different program to it. If you are programming it in Lua then we can't help you. This isn't a Lua site, it's an Arduino site.
    – Majenko
    Nov 15, 2017 at 11:02
  • @Majenko everytime i upload the code to 12-E using USB cable it works fine but when I detach the cable and plug it again the serial monitor will not show anything besides I have connected three leds they are also in off state Nov 15, 2017 at 12:07
  • Are you uploading Arduino code or Lua code?
    – Majenko
    Nov 15, 2017 at 12:08
  • @Majenko Its an arduino code Nov 15, 2017 at 12:12
  • You are using the Arduino IDE for this programming? With the ESP8266 core installed?
    – Majenko
    Nov 15, 2017 at 12:14

1 Answer 1

0

GPIO D3 on the NodeMCU is the ESP8266's GPIO0, which does put the device in flash mode when pulled low on power-up. Either put a pull-up resistor on that pin, or use a different pin for IO.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.