48 lines
1.7 KiB
Makefile
48 lines
1.7 KiB
Makefile
BOARD=soldered_inkplate6PLUS
|
|
GPIO=PCAL6416A
|
|
|
|
all: lib
|
|
|
|
lib: installed/ub_sched.py installed/ub_devices.py installed/conf_room_layout.py
|
|
|
|
main: lib
|
|
python3 pyboard.py --device /dev/ttyUSB0 -f cp conf_room/main.py :
|
|
screen /dev/ttyUSB0 115200
|
|
|
|
installed/ub_sched.py: conf_room/ub_sched.py
|
|
python3 pyboard.py --device /dev/ttyUSB0 -f cp conf_room/ub_sched.py :
|
|
cp conf_room/ub_sched.py installed/
|
|
|
|
installed/ub_devices.py: conf_room/ub_devices.py
|
|
python3 pyboard.py --device /dev/ttyUSB0 -f cp conf_room/ub_devices.py :
|
|
cp conf_room/ub_devices.py installed/
|
|
|
|
installed/conf_room_layout.py: conf_room/conf_room_layout.py
|
|
python3 pyboard.py --device /dev/ttyUSB0 -f cp conf_room/conf_room_layout.py :
|
|
cp conf_room/conf_room_layout.py installed/
|
|
|
|
test: lib
|
|
# ./pyboard.py --device /dev/ttyUSB0 -c 'from ub_sched import RoomSchedule, ROOM_CAPEN_212A; import ub_devices; ub_devices.connect(); print(RoomSchedule(ROOM_CAPEN_212A).fetch())'
|
|
./pyboard.py --device /dev/ttyUSB0 -c 'from conf_room_layout import refresh; refresh()'
|
|
|
|
ping:
|
|
./pyboard.py --device /dev/ttyUSB0 -c 'print("pong")' #--follow
|
|
|
|
connect_wifi: lib
|
|
./pyboard.py --device /dev/ttyUSB0 -c 'import ub_devices; ub_devices.connect();' #--follow
|
|
|
|
setup_board:
|
|
python3 -m esptool --port /dev/ttyUSB0 erase_flash
|
|
python3 -m esptool --port /dev/ttyUSB0 write_flash \
|
|
-z 0x1000 esp32spiram-20220117-v1.18.bin
|
|
python3 pyboard.py --device /dev/ttyUSB0 -f cp \
|
|
${GPIO}.py ${BOARD}.py image.py shapes.py gfx.py \
|
|
gfx_standard_font_01.py soldered_logo.py :
|
|
|
|
install_prereqs:
|
|
pip3 install esptool
|
|
|
|
connect_serial:
|
|
screen /dev/ttyUSB0 115200
|
|
|
|
.PHONY: all lib main test ping setup_board install_prereqs connect_serial connect_wifi |