Makefile 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. include config.mk
  2. RASPI_REMOTE?=${RASPI_USER}@${RASPI_IP}
  3. run:
  4. ssh pi@${RASPI_IP} "cd ${DEPLOY_DIR};./bin/simpi.py ${ARGS}"
  5. rerun: update run
  6. deploy: bcmlib wiringpi pythonlib
  7. update:
  8. ssh ${RASPI_REMOTE} mkdir -p ${DEPLOY_DIR}/sub/
  9. rsync -ai Makefile config.mk simpilib bin ${RASPI_REMOTE}:${DEPLOY_DIR}/
  10. rsync -ai --delete sub/wavesharelib/RaspberryPi\&JetsonNano/python/ ${RASPI_REMOTE}:${DEPLOY_DIR}/wavesharelib/
  11. install_ssh: update remote/deploy
  12. ssh/%:
  13. ssh ${RASPI_REMOTE} "cd raspi-zero-waveshare;${*}"
  14. remote/%:
  15. ssh ${RASPI_REMOTE} "cd raspi-zero-waveshare;$(MAKE) ${*}"
  16. bcmlib:
  17. wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.60.tar.gz
  18. tar zxvf bcm2835-1.60.tar.gz
  19. cd bcm2835-1.60/ && \
  20. sudo ./configure && \
  21. sudo make && \
  22. sudo make check && \
  23. sudo make install
  24. #For more details, please refer to http://www.airspayce.com/mikem/bcm2835/
  25. wiringpi:
  26. sudo apt-get install wiringpi
  27. #For Pi 4, you need to update it:
  28. wget https://project-downloads.drogon.net/wiringpi-latest.deb
  29. sudo dpkg -i wiringpi-latest.deb
  30. rm -rf wiringpi-latest.deb
  31. gpio -v
  32. #You will get 2.52 information if you install it correctly
  33. pythonlib:
  34. #python3
  35. sudo apt-get update
  36. sudo apt-get install python3-pip python3-pil python3-numpy
  37. sudo pip3 install RPi.GPIO spidev
  38. # demo-py/%:
  39. # cd e-Paper/RaspberryPi\&JetsonNano/python/examples && sudo python3 ${*}
  40. #
  41. # demo-c:
  42. # $(MAKE) -C e-Paper/RaspberryPi\&JetsonNano/c/ clean
  43. # $(MAKE) -C e-Paper/RaspberryPi\&JetsonNano/c/
  44. # cd e-Paper/RaspberryPi\&JetsonNano/c/ && ./epd
  45. #