Étape 3: ESPlorer
ESPlorer esta en java por lo que puede ejecutarse en cualquier sistema operativo siempre y cuando tengamos instalado la maquina virtuelle de java, pueden descargarlo de la siguiente pagina
https://github.com/nodemcu/nodemcu-firmware
Lo primero que debemos hacer al abrir ESPlorer es seleccionar el puerto en el que esta el ESP8266 y abrirlo, podremos ver un texto que nos indica la versión del firmware o que fue detectado
Copiamos y pegamos el siguiente ejemplo en el IDE y cargamos al ESP8266 con el boton « save to ESP » con eso ya estará cargado en nuestro ESP8266
Repositorio : https://github.com/sabas1080/ESP8266/tree/master/simple-oled-spi-example_lua
--installation SPI et connecter init_spi_display() fonction Affichage < br > -- setup SPI and connect display<br>function init_spi_display() -- Hardware SPI CLK = GPIO14-->SCL OLED -- Hardware SPI MOSI = GPIO13-->SDA OLED -- Hardware SPI MISO = GPIO12 (not used) -- CS, D/C, and RES can be assigned freely to available GPIOs cs = 8 -- GPIO15, pull-down 10k to GND dc = 4 -- GPIO2 --> D/C OLED res = 0 -- GPIO16 --> RST OLED
spi.setup(1, spi.MASTER, spi.CPOL_LOW, spi.CPHA_LOW, spi.DATABITS_8, 0) disp = u8g.ssd1306_128x64_spi(cs, dc, res) end
function xbm_picture() disp:setFont(u8g.font_6x10) disp:drawStr( 62, 10, "The") disp:drawStr( 62, 30, "Inventor's") disp:drawStr( 62, 60, "House") disp:drawXBM( 0, -5, 60, 60, xbm_data ) end --Converter Image to *.Mono with --http://www.online-utility.org/image_converter.jsp?outputType=MONO function bitmap_test(delay) file.open("prueba.MONO", "r") xbm_data = file.read() file.close()
disp:firstPage() repeat xbm_picture() until disp:nextPage() == false
tmr.wdclr() end
init_spi_display() bitmap_test()
Ne con este ejemplo ustedes podrán mostrar cualquier imagen en su pantalla OLED pero aucun podemos subir la imagen al modulo wifi en formato PNG o JPG, el formato en el Québec deben estar las imágenes es. MONO para esto lo haremos con la siguiente herramienta en ligne
http://www.Online-Utility.org/image_converter.jsp...
Primero elegimos el formato, luego presionamos el botón « Sélectionner le Format », con eso debemos seleccionar la imagen que queremos convertir y presionar el botón « convertir y descargar » Una vez hecho eso en nuestro ESPlorer presionamos el botón « upload » y seleccionamos el la imagen. Que MONO deseamos subir, reiniciamos el modulo y deberá aparecer algo así como esto