Reset Arduino

from time import sleep
import serial # pyserial

p = serial.Serial(port, 1200);

p.dtr = False
sleep(0.5)
p.dtr = True

p.close()
python3 -c "import time, serial; p = serial.Serial('${port}', 1200); p.dtr = False; time.sleep(0.5); p.dtr = True"