Last active
January 6, 2018 06:09
Revisions
-
switchtrue revised this gist
Jan 19, 2017 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,9 +26,14 @@ Install esptool: pip install esptool ``` Erase: ``` esptool.py --port /dev/tty.wchusbserialfd120 erase_flash ``` Flash: ``` esptool.py --port /dev/tty.wchusbserialfd120 --baud 115200 write_flash --flash_size=detect 0 ~/Downloads/esp8266-20170108-v1.8.7.bin --verify ``` Connect to the NodeMCU: -
switchtrue revised this gist
Jan 19, 2017 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,6 +7,13 @@ Install a serial driver for the NodeMCU from: [http://www.wch.cn/download/CH341S Plugin the NodeMCU and see if you can see it at `/dev/tty.wchusbserialfd120` **NOTE**: If you can't find it at the above locations try `ls /dev/cu.*` and see what else is available. **OSX Sierra Important Note**: After upgrading to Sierra plugging in my NodeMUC I kept getting Kernel panics and the laptop would restart. To fix this I uninstalled the original drivers with the following commands, restarted and then re-installed from the link above. ``` sudo rm -rf /Library/Extensions/usbserial.kext sudo rm -rf /System/Library/Extensions/usb.kext # Restart computer now ``` Grab firmware from here: https://micropython.org/download/ Install pyserial: -
switchtrue revised this gist
Aug 24, 2016 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,22 +33,22 @@ Might need to hit enter a few times at REPL to get `>>>` try it: ``` >>> print('Hello, World!') ``` Connect to a network: ``` >>> import network >>> n = network.WLAN(network.STA_IF) >>> n.active(True) >>> n.connect('<SSID>', '<password>') ``` Note: Don't get SSID and password wrong as it seems to indefinitely reconnect even after re-flashes and log to stdout, you can enter paste mode (ctrl+e) and enter the above code again to retry but its tricky. Start the Web REPL: ``` >>> import webrepl >>> webrepl.start() ``` -
switchtrue created this gist
Aug 24, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,54 @@ NodeMCU mode: Keyes NodeMCU OS: Mac OS X (macOS) Install a serial driver for the NodeMCU from: [http://www.wch.cn/download/CH341SER_MAC_ZIP.html](http://www.wch.cn/download/CH341SER_MAC_ZIP.html) Plugin the NodeMCU and see if you can see it at `/dev/tty.wchusbserialfd120` **NOTE**: If you can't find it at the above locations try `ls /dev/cu.*` and see what else is available. Grab firmware from here: https://micropython.org/download/ Install pyserial: ``` pip install pyserial ``` Install esptool: ``` pip install esptool ``` Flash: ``` esptool.py --port /dev/tty.wchusbserialfd120 --baud 115200 write_flash --flash_mode qio --flash_size 32m 0x0 esp8266-20160818-v1.8.3-35-g49dd532.bin --verify ``` Connect to the NodeMCU: ``` screen /dev/cu.wchusbserialfd120 115200 ``` Might need to hit enter a few times at REPL to get `>>>` try it: ``` print('Hello, World!') ``` Connect to a network: ``` import network n = network.WLAN(network.STA_IF) n.active(True) n.connect('<SSID>', '<password>') ``` Note: Don't get SSID and password wrong as it seems to indefinitely reconnect even after re-flashes and log to stdout, you can enter paste mode (ctrl+e) and enter the above code again to retry but its tricky. Start the Web REPL: ``` import webrepl webrepl.start() ```