HTTP/1.1 200 OK\r\n Content-Type: image/gif\r\n Content-Length: [length in bytes of the image]\r\n \r\n [binary data of your image]
Архивы автора: admin
ESP8266 – Oled I2C – Micropython
from machine import Pin, I2C import ssd1306 from time import sleep # 1 3 Busy GREEN = Pin(0, Pin.OUT) GREEN.on() BLUE_OLED = Pin(2, Pin.OUT) BLUE_OLED.on() def do_connect(): import network wlan = network.WLAN(network.STA_IF) wlan.active(True) if not wlan.isconnected(): print('connecting to network...') wlan.connect('ssd', 'pass') while not wlan.isconnected(): pass print('network config:', wlan.ifconfig()) do_connect() i2c = I2C(-1, scl=Pin(4), sda=Pin(5)) print(i2c.scan()) oled_width = 128 oled_height = 64 oled = ssd1306.SSD1306_I2C(oled_width, oled_height, i2c) oled.text('Hello, World 1!', 0, 0) oled.text('Hello, World 2!', 0, 10) oled.text('Hello, World 3!', 0, 20) oled.show()
ESP8266(ex) from Aliexpress upload Micropython
esptool.py –port /dev/ttyUSB0 –baud 115200 write_flash –flash_size=detect -fm dio 0 esp8266-20171101-v1.9.3.bin
Если после загрузки не работает REPL через COM порт при любой скорости.