Skip to content

Instantly share code, notes, and snippets.

@pfeerick
Created December 8, 2016 05:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pfeerick/bef32c7cc457ec1e508f8d8bb01bc993 to your computer and use it in GitHub Desktop.
Save pfeerick/bef32c7cc457ec1e508f8d8bb01bc993 to your computer and use it in GitHub Desktop.
Fixed up shell script for Digistump Oak 'easy serial update'
#!/bin/bash
read -p "Please enter the path of your USB-Serial Adapter (ex: /dev/ttyUSB0):" comport
read -p "Ensure Oak is attached as shown here and press a key: digistump.com/wiki/oak/serialupdate" -n1 -s
echo
echo "Updating..."
python esptool.py --baud 115200 --port $comport write_flash -fs 32m 0x1000 blank.bin 0x2000 firmware_v1.bin 0x101000 blank.bin 0x102000 blank.bin 0x202000 blank.bin
echo "Done!"
read -n1 -s -t3
@pfeerick
Copy link
Author

pfeerick commented Dec 8, 2016

Changes: Missing bin/bash added, extra echo added so "Updating..." doesn't go on same line as rest of messages, and three second timeout on the final input.

@pfeerick
Copy link
Author

pfeerick commented Dec 8, 2016

Confirmed working on Raspbian Jessie Lite November 2016 image on 8-DEC-2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment