Skip to content

Latest commit

 

History

History
53 lines (43 loc) · 1.4 KB

ESP8266.md

File metadata and controls

53 lines (43 loc) · 1.4 KB

Install pegasusOS on ESP8266EX

Requiments

$ python3 -m venv venv
$ source venv/bin/activate
$ pip install esp-tool adafruit-ampy

Flashing MicroPython on ESP8266

Remember to ground PIN 0 for flash mode. I've added a push button to the UART-to-USB dongle for that. I then push it while plugging in.

Get the latest firmware from MicroPython Download Page for ESP8266 1MB. That's the chip I got.

At the time of writing, this was the latest file: esp8266-20230426-v1.20.0.bin.

As super user.

$ su
$ esptool.py chip_id
$ esptool.py --port /dev/ttyUSB0 erase_flash
$ esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --flash_size=detect -fm dout 0 esp8266-1m-20230426-v1.20.0.bin
  • chip_id lists specs and confirms that everything works
  • erase_flash clears everything
  • write_flash flashes the MicroPython firmware

pushing OSs

1.) Download pegasusOS-main.py
2.) Rename downloaded sources to main.py**

Prepare Envronment

Do this once

$ python3 -m venv venv
$ source venv/bin/activate
$ pip install ampy

Next time

$ source venv/bin/activate
$ ampy --port /dev/ttyUSB0 put main.py
$ ampy --port /dev/ttyUSB0 put hello.txt
  • main.py is the pegasusOS, this file name will run at boot
  • hello.txt is just a test file so you have something to play with
  • put your own files the same way
  • do not ovevrite the system boot.py file!