Uploading hex file wirelessly to rotator's arduino micro - jharwinbarrozo/rotcontrol GitHub Wiki

For macosx:

  1. Compile the sketch in Arduino IDE and look for the verbose log, pay attention to where and what's the hex it creates. For this example, IDE dumped the hex file to
    /var/folders/f_/zfqrgj411xl071q_1q7ftzrh0000gn/T/arduino_build_338374/Current-Rotator6-Micro-withOptiboot-9600.ino.hex

  2. We're now able to use this. This command uses the ArduinoOTA protocol, the only difference is that we're running the command direct in terminal instead of letting IDE to do the job by uploading thru network port. Paste and run this in terminal

/Users/jharwinbarrozo/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0/bin/arduinoOTA -address 192.168.1.51 -port 80 -sketch /var/folders/f_/zfqrgj411xl071q_1q7ftzrh0000gn/T/arduino_build_338374/Current-Rotator6-Micro-withOptiboot-9600.ino.hex -upload /pgm/upload -sync /pgm/sync -reset /log/reset -sync_exp 204:SYNC

For Ubuntu:

/home/ubuntu/snap/arduino/7/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0/bin/arduinoOTA -address 192.168.1.51 -port 80 -sketch /home/ubuntu/New-shielded-rotator6-Micro-withOptiboot.ino.hex -upload /pgm/upload -sync /pgm/sync -reset /log/reset -sync_exp 204:SYNC

hex file is usually located at /tmp/snap.arduino, you can access it using the file explorer gui to open the folder but you have to login with your password. You can just easily copy this hex file to /home/ubuntu/hex_file.hex and use this as path.