#/bin/bash

port=$(python3 list_com_ports_ESP32.py);
if [ "$port" = "" ]; then
    echo "Robot not detected, be sure the robot is connected to the computer"
    exit
fi

python3 esptool.py --port $port erase_flash
