Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pip install esptool
- //OR
- sudo pip install esptool
- //clear the chip
- esptool.py --port /dev/ttyUSB erase_flash
- //upload the micropython
- esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0 firmware.bin
- //access to the board
- //if screen cannot be installed use picocom
- screen /dev/tty.board_name 115200
- //use ampy to push/pull the files from board
- /*ampy commands
- ampy - Adafruit MicroPython Tool
- Ampy is a tool to control MicroPython boards over a serial connection.
- Using ampy you can manipulate files on the board's internal filesystem and
- even run scripts.
- Options:
- -p, --port PORT Name of serial port for connected board. [required]
- -b, --baud BAUD Baud rate for the serial connection. (default 115200)
- --help Show this message and exit.
- Commands:
- get Retrieve a file from the board.
- ls List contents of a directory on the board.
- put Put a file on the board.
- rm Remove a file from the board.
- run Run a script and print its output.
- ESP8266 - MicroPython tutorial
- #to flash the board --- KEEP IN MIND THAT TX AND RX PINS ARE DISCONNECTED!!!
- sudo esptool.py --port /dev/ttyUSB0 erase_flash
- #upload/flash python to the board --- some boards will require this flag in order to flash the board --flash_mode=dio
- sudo esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_mode=dio --flash_size=detect 0 ~/Downloads/esp8266-20171101-v1.9.3.bin
- #to put script to the board use this command
- #you can use PUT, GET...
- sudo ampy --port /dev/ttyUSB0 put main.py
- # access to the baord python shell
- picocom /dev/ttyUSB0 -b115200
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement