Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /customers/c/c/9/esploradores.com/httpd.www/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340 MICROPYTHON ESP32 – Instalación de MicroPython en el microcontrolador ESP32 con WINDOWS – ESPloradores

MICROPYTHON ESP32 – Instalación de MicroPython en el microcontrolador ESP32 con WINDOWS

INSTALACIÓN DE MICROPYTHON

Los pasos para instalar MicroPython en el microcontrolador ESP32 son los siguientes:

  1. Descargar e instalar el intérprete de Python en el ordenador.
  2. Instalar esptool.py en Python . Es una herramienta para subir bootloaders (cargadores de arranque)  a microcontroladores ESP8266 y ESP32.
  3. Descargar el firmware de MicroPython para el microcontrolador ESP32.
  4. Instalar el firmware en el microcontrolador ESP32 (flasheado).

PASO 1 - DESCARGA E INSTALACIÓN DEL INTÉRPRETE DE PYTHON

El fichero de instalación del intérprete de Python lo descargamos desde su página oficial (https://www.python.org).

Seleccionaremos el fichero correcto en función del procesador de nuestro ordenador (32 bits o 64 bits).

En cualquier caso, estos son los enlaces directos para la descarga de la versión del intérprete de Python 3.8 para Windows x86 (32-bits)  y  Windows x64 (64-bits).

Una vez descargado procedemos a instalarlo. Al abrir el fichero de instalación, debemos seleccionar “Add Python 3.8 to PATH” (para que Python sea accesible desde cualquier punto del Símbolo de sistema -CMD-) y hacer clic en “Install Now” para que se instale.

Para comprobar que la instalación se ha realizado correctamente accedemos al Símbolo de sistema (CMD), pulsando la combinación de teclas “Windows + R”, escribimos “cmd” en el cuadro de texto que aparece en la ventana y hacemos clic en “Aceptar”.

Desde el Símbolo de sistema (CMD) escribimos “python” y si todo está correcto nos informará de la versión instalada y nos dará acceso a la sesión del intérprete de Python.

PASO 2 - INSTALACIÓN DE ESPTOOL.PY EN PYTHON

Accedemos al Símbolo de sistema (CMD) y escribimos “pip install esptool”  para que se instale esptool.py.

En algunas instalaciones de Python esta instrucción no funciona y genera un error. Alternativamente se puede probar con “python -m pip install esptool“, “py -m pip install esptool” o “pip2 install esptool“.

PASO 3 - DESCARGA DEL FIRMWARE DE MICROPYTHON PARA EL MICROCONTROLADOR ESP32

El firmware más actualizado lo podemos descargar desde su página oficial (http://www.micropython.org/download#esp32). Elegimos la versión en función de la placa en la que vayamos a instalarlo.

Por ejemplo, de la selección de placas que hay a continuación, –a la fecha de la redacción de este post– el adecuado para la primera sería el esp32-20190416-v1.10-284-ga6e5846ba.bin y para la segunda y tercera el esp32spiram-20190416-v1.10-284-ga6e5846ba.bin, al disponer estas dos de 4MB de psRAM (SPIRAM).

DEVKIT V1 – 30 PINS ESP-32
520kB-SRAM
4MB-Flash

Zerynth Docs

TTGO T8 ESP-32
520kB-SRAM + 4MB-psRAM
4MB-Flash
SD Card
GitHub

M5Stack Fire Kit! ESP-32
520kB-SRAM + 4MB-psRAM
16MB-Flash
SD Card- LCD 2″-  Bat. 150mA
GitHub

PASO 4 - INSTALACIÓN DEL FIRMWARE EN EL MICROCONTROLADOR ESP32 (FLASHEADO)

Para instalar el firmware en el microcontrolador conectamos la placa al ordenador a través de un puerto USB.

Necesitamos identificar el puerto de comunicaciones (COM) en el que ha quedado conectada. Es muy sencillo hacerlo a través del panel de control de Windows.

En la imagen vemos un ejemplo, en el que la placa está conectada en el puerto de comunicaciones COM3.

Si al conectar la placa en el ordenador no aparece el puerto de comunicaciones en el que está conectada puede ser por dos problemas:

  • El cable USB no tiene hilos para transmitir datos (solo dispone de hilos para carga de dispositivos). La solución es cambiar el cable por otro que permita la transmisión de datos.
  • El ordenador no encuentra la placa, porque no se han instalado correctamente el driver del chip de comunicaciones (USB-UART). Las placas más modernas utilizan el chip CP2102 (es un chip cuadrado de aproximadamente 0,5 cm de lado, que aparece rotulado con su nombre). Este es un enlace de su driver: https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers.

El siguiente paso será borrar la memoria flash del microcontrolador ESP32, para evitar conflictos entre el software preinstalado y el software que se va a instalar.

Lo hacemos escribiendo “esptool.py –port COMx erase_flash” en el Símbolo del sistema (CMD). Sustituiremos “x” por el número del puerto de comunicaciones en el que esté conectada la placa.

Normalmente el adaptador USB-UART controla los pines relacionados con los botones EN (reset) y BOOT (bootloader mode).

Si no se inicia el borrado de la memoria flash o la instalación del firmware la solución es presionar brevemente el botón EN una vez que se haya realizado la solicitud de borrado a través del Símbolo de sistema (CMD).

Por último escribimos “esptool.py –port COMx –BAUD 460800 write_flash -z 0x1000 ruta_nombre_firmware”. Sustituiremos “x” por el número del puerto de comunicaciones en el que esté conectada la placa y “ruta_nombre_firmware” por la ruta (carpeta) en la que se haya descargado el firmware de micropython y el nombre de su fichero.

Si todo ha salido bien la instalación estará completa.

Si el contenido del artículo te ha parecido interesante y vas a hacer una compra en Amazon, puedes colaborar con el blog realizando la compra siguiendo el enlace que aparece a continuación. El precio es el mismo para ti, pero este blog recibira una pequeña comisión sobre tu compra.

[button special_style=”yes” border_radius=”2″ three_d=”yes” size=”large” color=”pumpkin” title=”ELIGIENDO UNA PLACA CON EL MICROCONTROLADOR ESP32 PARA TRABAJAR CON MICROPYTHON” link=”https://www.esploradores.com/eligiendo_una_placa_esp32″ icon=”hb-moon-arrow-left-3″]
[button special_style=”yes” border_radius=”2″ three_d=”yes” size=”large” color=”emerald” title=”ELIGIENDO UN IDE/EDITOR DE CÓDIGO
PARA MICROPYTHON” link=”https://www.esploradores.com/editorcodigo_micropython/” icon=”hb-moon-arrow-right-4″]

Publicado por Dani No

Es un diseñador de inventos revolucionarios que le podrían convertir en el hombre mas más rico del mundo. Es un maker que publica tanto unos artículos que son geniales como otros que son infumables. Años de experiencia y fracasos en proyectos tecnológicos le avalan.

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *