aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md53
1 files changed, 53 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..ca445c5
--- /dev/null
+++ b/README.md
@@ -0,0 +1,53 @@
+# Installing `esptool`
+
+ $ git clone https://github.com/themadinventor/esptool.git
+ $ cd esptool
+ $ python setup.py install -local
+
+# NodeMCU Uploader
+
+This tool uploads the Lua files. Requires that the device is runnig the Lua firmware.
+
+ $ git clone https://github.com/kmpm/nodemcu-uploader.git
+ $ cd nodemcu-uploader
+
+https://github.com/nodemcu/nodemcu-firmware
+
+# Talking to the Lua firmware
+
+On unix Screen is a useful tool to talk to serial ports. Usage:
+
+ $ screen <device> <baud rate>
+
+ $ screen /dev/ttyUSB0 9600
+
+After starting screen and pressing reset you should get some output similar to this:
+
+ <��������������x�
+
+ NodeMCU 0.9.6 build 20150704 powered by Lua 5.1.4
+ lua: cannot open init.lua
+ >
+
+The first garbage output is expected and is from the bootloader trying to autodetect the baud rate.
+
+# First Code
+
+Open screen and paste this code:
+
+ -- Get the current IP
+ ip = wifi.sta.getip()
+ -- This should print nil
+ print(ip)
+
+ -- Configure the device
+ wifi.setmode(wifi.STATION)
+ wifi.sta.config("...", "...")
+
+ -- Now check that the IP is assigned. It might take some time so try again.
+ ip = wifi.sta.getip()
+ print(ip)
+
+# References
+
+ * [Lua API](https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en)