-->
Page 1 of 1

HELP//problem running simple codes to control GPIO pins

PostPosted: Sat Sep 19, 2015 12:08 pm
by eagle1
Hi,
I bought nodemcu devkit 1.0. After learning basic functions of lua loader.

I started to write and upload simple codes for controlling GPIO pins, and then move to other advanced codes.

1.So, I wrote this simple code for LED blink and didn't work.
while 1 do
gpio.write(4,gpio.HIGH)
tmr.delay(10000)
gpio.write(4,gpio.LOW)
tmr.delay(10000)
end


2.I get these messages when connecting the chip, are they OK?


Connected to COM2 at 9600 baud

0‚n?†$û!‹Y…I:¶CCE’)–ü_SAø

NodeMCU 0.9.5 build 20150318 powered by Lua 5.1.4

Hard Restart Saturday, September 19, 2015 18:36:07


Regards,

Re: HELP//problem running simple codes to control GPIO pins

PostPosted: Sat Sep 19, 2015 12:34 pm
by flagtrax
I don't think the first line is coming from the 8266, the garble, then startup message are. What terminal emulator are you using? How are you uploading the code to the module?

Re: HELP//problem running simple codes to control GPIO pins

PostPosted: Sat Sep 19, 2015 3:26 pm
by eagle1
1. Lua loader, upload the code successfully with no result.
2. Also tried esplorer, do not upload the code, can't detect the device.
3. Arduino IDE, nothing is working.