Uploading .hex to Arduino Leonardo pro micro atmega32u
Posted: Sat Jun 30, 2018 2:47 am
GIMX was not recognizing my Leonardo so I couldn't install firmware throw it, after researching I found that Leonardo atmega32u4 need reset to enter bootloader to upload
The reset procedure is: open port at 1200 bps with DTR=false, and close.
You need to wait 1 second to reset and the bootloader then you can talk to the bootloader and upload the firmware.
This python script do the job:
Adjust "dev/ttyACM0" check with "ls /dev/ttyACM*" what's your device.
The reset procedure is: open port at 1200 bps with DTR=false, and close.
You need to wait 1 second to reset and the bootloader then you can talk to the bootloader and upload the firmware.
This python script do the job:
Adjust "dev/ttyACM0" check with "ls /dev/ttyACM*" what's your device.
Code: Select all
#!/usr/bin/env python
import serial
port='/dev/ttyACM0'
ser = serial.Serial()
ser.port=port
ser.setDTR(False)
ser.close() #with it is already open, close it.
ser.baudrate=1200
ser.open(); ser.close()