arduino-mk
Compile and upload Arduino sketches with Ruby.
Usage
arduino = Arduino.new(board: "uno")
if arduino.upload("/path/to/project")
puts "Sketch uploaded successfully!"
else
puts arduino.error
endTo test if your project compiles without uploading:
if arduino.compiles?("/path/to/project")
puts "Sketch compiles successfully!"
else
puts arduino.error
endTo reset your Arduino:
if arduino.reset
puts "Arduino reset successfully!"
else
puts arduino.error
endFurther configuration
To include additional Makefile configuration:
arduino = Arduino.new(board: "uno", arduino_dir: "/path/to/arduino/libs")The path of the default Makefile is available at:
Arduino.makefileYou can use this as reference.