ir-remote/arduino/Makefile

24 lines
578 B
Makefile
Raw Permalink Normal View History

2022-06-30 22:05:00 -04:00
BOARD = arduino:avr:uno
PORT = /dev/ttyACM0
SERIAL = 9600
SCREEN_NAME = arduino
DEPS = IRremote
.PHONY: compile
compile:
arduino-cli compile -v --libraries ./libraries/ --fqbn arduino:avr:uno .
deploy: compile
# Screen can't be consuming the TTY
if screen -S $(SCREEN_NAME) -Q select .; then screen -XS $(SCREEN_NAME) quit; fi
# Upload the code now that screen isn't running
arduino-cli upload --fqbn $(BOARD) --port $(PORT) .
deps:
arduino-cli lib install $(DEPS)
screen:
# -dR - Reattach; logout remotely if required
screen -DRqS $(SCREEN_NAME) $(PORT) $(SERIAL)