Implement Arduino Hex Firmware with Android using java code Java library Java-ArduinoSketchUploader This repository contains a Java library that can be used to upload a compiled sketch (.HEX) directly to an Arduino board over USB. It talks to the boards bootloader over the serial (USB) connection, much like avrdude does (when invoked from the Arduino IDE, or from the command line).
The library has been tested with the following configurations:
Arduino Model | MCU | Bootloader protocol |
---|---|---|
Mega 2560 | ATMega2560 | STK500v2 |
Micro | ATMega32U4 | AVR109 |
Uno (R3) | ATMega328P | STK500v1 |
Create object implement ISerialPortStream interface,then usage anonymous or passing clazz generics for ArduinoSketchUploader object : Anonymous:
ArduinoSketchUploader<SerialPortStreamImpl> uploader = new ArduinoSketchUploader<SerialPortStreamImpl>(optionsMega,logger,progress) {};
Clazz generics:
ArduinoSketchUploader<SerialPortStreamImpl> uploader = new ArduinoSketchUploader<SerialPortStreamImpl>(
SerialPortStreamImpl.class, optionsUno, logger, progress) ;