projects:internetofthings:micropython

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
projects:internetofthings:micropython [2018/01/23 12:34] – [jupyter] scipioprojects:internetofthings:micropython [2018/11/03 08:46] (current) – [led] scipio
Line 12: Line 12:
 esptool.py chip_id esptool.py chip_id
 </code> </code>
 +
 +===== esp32 =====
 +
 +Download firmware from http://www.micropython.org/download
 +
 +erase flash (before any micropython deploy)
 +<code>
 +export PORT=/dev/ttyUSB1
 +esptool.py --chip esp32 --port $PORT erase_flash
 +</code>
 +
 +write firmware
 +<code>
 +esptool.py --chip esp32 --port $PORT write_flash -z 0x1000 esp32-20181103-v1.9.4-683-gd94aa577a.bin
 +</code>
 +
 +
 +==== old ====
 +
 +Based on [[https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo|loboris fork]] of micropython
 +
 +<code>
 +sudo apt-get install git wget make libncurses-dev flex bison gperf python python-serial
 +</code>
 +
 +<code>
 +git clone --depth 1 https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo
 +cd MicroPython_ESP32_psRAM_LoBo
 +cd MicroPython_BUILD
 +./BUILD.sh menuconfig
 +./BUILD.sh
 +./BUILD.sh flash
 +# reboot board disconnecting power
 +</code>
 +
 +
 +
 +  * download micropython from http://micropython.org/download#esp32
 +
 +
 +
 +If you are putting MicroPython on for the first time then you should first erase the entire flash
 +<code>
 +esptool.py --port /dev/ttyUSB0 erase_flash
 +</code>
 +
 +
  
 ===== esp8266 ===== ===== esp8266 =====
Line 17: Line 64:
 download micropython from http://micropython.org/download#esp8266 download micropython from http://micropython.org/download#esp8266
 <code> <code>
-wget http://micropython.org/resources/firmware/esp8266-20171101-v1.9.3.bin+wget http://micropython.org/resources/firmware/esp8266-20180511-v1.9.4.bin
 </code> </code>
  
 erase (optional ?) and upload erase (optional ?) and upload
 <code> <code>
-esptool.py --port /dev/ttyUSB0 erase_flash +#esptool --port /dev/ttyUSB0 erase_flash 
-esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0 esp8266-20171101-v1.9.3.bin+esptool --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0 esp8266-20180511-v1.9.4.bin 
 + 
 +# oppure 
 +esptool --port /dev/ttyUSB0 --baud 115200 write_flash --flash_mode dout --verify --flash_size=detect -fm dio 0 esp8266-20180511-v1.9.4.bin
 </code> </code>
 +
 +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)
-</code> 
- 
-===== jupyter ===== 
- 
-https://github.com/goatchurchprime/jupyter_micropython_kernel/ 
- 
-<code> 
-git clone https://github.com/goatchurchprime/jupyter_micropython_kernel.git 
-pip install -e jupyter_micropython_kernel 
-python -m jupyter_micropython_kernel.install 
-</code> 
- 
-widgets 
-<code> 
-pip install ipywidgets 
-jupyter nbextension enable --py widgetsnbextension 
-</code> 
- 
-turtle [[https://github.com/takluyver/mobilechelonian|docs]]  
-<code> 
-pip install https://github.com/takluyver/mobilechelonian/archive/master.zip 
-</code> 
- 
-run jupyter 
-<code> 
-jupyter notebook 
 </code> </code>
  
  
  • projects/internetofthings/micropython.1516707289.txt.gz
  • Last modified: 2018/01/23 12:34
  • by scipio