Upload sketch with OTA - peno64/ArduinoOTAwiki GitHub Wiki

See example https://github.com/JAndrassy/ArduinoOTA/blob/master/examples/OTEthernet/OTEthernet.ino

  • First upload this example to the arduino mega the standard way via usb.
  • Change the mac if needed.
  • Check in the monitor which ip address is assigned to the arduino.
  • Edit C:\Users\<user>\AppData\Local\Arduino15\packages\my_boards\hardware\avr\programmers.txt and add the ip address
  • In Tools, Board: , choose my_boards-avr (in Sketchbook), Arduino Mega 2560 (Optiboot)
  • In Tools, Programmer:, choose Arduino OTA (ip)
  • Make sure that Serial Monitor is closed!!! If not there is a chance that the arduino is reset too soon and as result a corrupted sketch is flashed.
  • In Sketch, choose Upload Using Programmer

image

image

image

image

image