aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md50
1 files changed, 44 insertions, 6 deletions
diff --git a/README.md b/README.md
index ca445c5..87b6fc0 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,12 @@
-# Installing `esptool`
+# Required Tools
+
+## Installing `esptool`
$ git clone https://github.com/themadinventor/esptool.git
$ cd esptool
$ python setup.py install -local
-# NodeMCU Uploader
+## NodeMCU Uploader
This tool uploads the Lua files. Requires that the device is runnig the Lua firmware.
@@ -13,12 +15,32 @@ This tool uploads the Lua files. Requires that the device is runnig the Lua firm
https://github.com/nodemcu/nodemcu-firmware
+# Installing Lua Interpreter
+
+1. Download a release from https://github.com/nodemcu/nodemcu-firmware/releases
+1. Check that you have a connection to the board:
+
+ $ esptool.py read_mac
+ Connecting...
+ MAC: 18:fe:34:06:59:a5
+
+1. Upload firmware
+
+ $ esptool.py write_flash 0x0 nodemcu_integer_0.9.6-dev_20150704.bin
+ Connecting...
+ Erasing flash...
+ Wrote 450560 bytes at 0x00000000 in 43.8 seconds (82.4 kbit/s)...
+
+ Leaving...
+
+1. Now start talking!
+
# Talking to the Lua firmware
-On unix Screen is a useful tool to talk to serial ports. Usage:
+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:
@@ -27,7 +49,7 @@ After starting screen and pressing reset you should get some output similar to t
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.
@@ -41,13 +63,29 @@ Open screen and paste this code:
print(ip)
-- Configure the device
- wifi.setmode(wifi.STATION)
+ 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)
+# Building a new Lua firmware
+
+## Build and install the compiler and SDK
+
+ $ git clone --recursive https://github.com/pfalcon/esp-open-sdk.git
+ $ cd esp-open-sdk
+ $ make STANDALONE=n
+ .. wait a while ..
+
+ Add the compiler to your $PATH (see output)
+
+ $ cd ..
+ $ git clone https://github.com/nodemcu/nodemcu-firmware
+ $ cd nodemcu-firmware
+ $ make
+
# References
* [Lua API](https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en)