Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
projects:internetofthings:micropython [2018/01/23 12:34] – [jupyter] scipio | projects:internetofthings:micropython [2018/11/03 08:46] (current) – [led] scipio | ||
---|---|---|---|
Line 12: | Line 12: | ||
esptool.py chip_id | esptool.py chip_id | ||
</ | </ | ||
+ | |||
+ | ===== esp32 ===== | ||
+ | |||
+ | Download firmware from http:// | ||
+ | |||
+ | erase flash (before any micropython deploy) | ||
+ | < | ||
+ | export PORT=/ | ||
+ | esptool.py --chip esp32 --port $PORT erase_flash | ||
+ | </ | ||
+ | |||
+ | write firmware | ||
+ | < | ||
+ | esptool.py --chip esp32 --port $PORT write_flash -z 0x1000 esp32-20181103-v1.9.4-683-gd94aa577a.bin | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== old ==== | ||
+ | |||
+ | Based on [[https:// | ||
+ | |||
+ | < | ||
+ | sudo apt-get install git wget make libncurses-dev flex bison gperf python python-serial | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | git clone --depth 1 https:// | ||
+ | cd MicroPython_ESP32_psRAM_LoBo | ||
+ | cd MicroPython_BUILD | ||
+ | ./BUILD.sh menuconfig | ||
+ | ./BUILD.sh | ||
+ | ./BUILD.sh flash | ||
+ | # reboot board disconnecting power | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | * download micropython from http:// | ||
+ | |||
+ | |||
+ | |||
+ | If you are putting MicroPython on for the first time then you should first erase the entire flash | ||
+ | < | ||
+ | esptool.py --port / | ||
+ | </ | ||
+ | |||
+ | |||
===== esp8266 ===== | ===== esp8266 ===== | ||
Line 17: | Line 64: | ||
download micropython from http:// | download micropython from http:// | ||
< | < | ||
- | wget http:// | + | wget http:// |
</ | </ | ||
erase (optional ?) and upload | erase (optional ?) and upload | ||
< | < | ||
- | esptool.py --port / | + | #esptool --port / |
- | esptool.py --port / | + | esptool --port / |
+ | |||
+ | # oppure | ||
+ | esptool --port / | ||
</ | </ | ||
+ | |||
+ | after press buttons !!!! | ||
access from serial over USB | access from serial over USB | ||
Line 63: | Line 115: | ||
# GPIO16 (D0) is the internal LED for NodeMCU | # GPIO16 (D0) is the internal LED for NodeMCU | ||
+ | # PIN 22 fro TTGO MINI32 | ||
led = Pin(16, Pin.OUT) | led = Pin(16, Pin.OUT) | ||
Line 72: | Line 125: | ||
#led.off() | #led.off() | ||
#sleep(1) | #sleep(1) | ||
- | </ | ||
- | |||
- | ===== jupyter ===== | ||
- | |||
- | https:// | ||
- | |||
- | < | ||
- | git clone https:// | ||
- | pip install -e jupyter_micropython_kernel | ||
- | python -m jupyter_micropython_kernel.install | ||
- | </ | ||
- | |||
- | widgets | ||
- | < | ||
- | pip install ipywidgets | ||
- | jupyter nbextension enable --py widgetsnbextension | ||
- | < | ||
- | |||
- | turtle [[https:// | ||
- | < | ||
- | pip install https:// | ||
- | </ | ||
- | |||
- | run jupyter | ||
- | < | ||
- | jupyter notebook | ||
</ | </ | ||