arduino-mk with Arduino IDE 1.6.12¶
2019年02月10日
Install arduino-mk¶
とってくる。
git clone https://github.com/sudar/Arduino-Makefile.git
ここでは ${HOME}/work/Arduino-Makefile に置いたとする。
Makefile¶
# Arduino Make file. Refer to https://github.com/sudar/Arduino-Makefile
ARDUINO_DIR = $(HOME)/.arduino/arduino-1.6.12
AVR_TOOLS_DIR = $(ARDUINO_DIR)/hardware/tools/avr
ARDMK_DIR = $(HOME)/work/Arduino-Makefile
BOARD_TAG = uno
MONTOR_PORT = /dev/ttyACM0
AVRDUDE_CONF = $(ARDUINO_DIR)/hardware/tools/avr/etc/avrdude.conf
include $(HOME)/work/Arduino-Makefile/Arduino.mk
Arduinoのライブラリ指定する場合は$(HOME)/sketchbook/librariesに追加の上、 ARDUINO_LIBSに列記してください。
# Arduino Make file. Refer to https://github.com/sudar/Arduino-Makefile
ARDUINO_DIR = $(HOME)/.arduino/arduino-1.6.12
AVR_TOOLS_DIR = $(ARDUINO_DIR)/hardware/tools/avr
ARDMK_DIR = $(HOME)/work/Arduino-Makefile
BOARD_TAG = uno
MONTOR_PORT = /dev/ttyACM0
AVRDUDE_CONF = $(ARDUINO_DIR)/hardware/tools/avr/etc/avrdude.conf
ARDUINO_LIBS += Wire Adafruit_MotorShield
include $(HOME)/work/Arduino-Makefile/Arduino.mk
その他¶
シリアルコンソールはino serialの方が 使いやすかったのでそっちを使っています。