Bladeren bron

some code

Tobias Simetsreiter 4 jaren geleden
bovenliggende
commit
1151fac1c7
3 gewijzigde bestanden met toevoegingen van 45 en 1 verwijderingen
  1. 1 1
      .gitignore
  2. 42 0
      Makefile
  3. 2 0
      config.mk.j2

+ 1 - 1
.gitignore

@@ -57,4 +57,4 @@ docs/_build/
 
 # PyBuilder
 target/
-
+config.mk

+ 42 - 0
Makefile

@@ -0,0 +1,42 @@
+
+include config.mk
+
+all: bcmlib wiringpi pythonlib
+
+update:
+	rsync -ai ./ pi@${RASPI_IP}:raspi-zero-waveshare/
+
+remote/%:
+	ssh pi@${RASPI_IP} "cd raspi-zero-waveshare;$(MAKE) ${*}"
+
+bcmlib:
+	wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.60.tar.gz
+	tar zxvf bcm2835-1.60.tar.gz
+	cd bcm2835-1.60/ && \
+	sudo ./configure && \
+	sudo make && \
+	sudo make check && \
+	sudo make install
+	#For more details, please refer to http://www.airspayce.com/mikem/bcm2835/
+
+wiringpi:
+	sudo apt-get install wiringpi
+	#For Pi 4, you need to update it:
+	wget https://project-downloads.drogon.net/wiringpi-latest.deb
+	sudo dpkg -i wiringpi-latest.deb
+	rm -rf wiringpi-latest.deb
+	gpio -v
+	#You will get 2.52 information if you install it correctly
+
+pythonlib:
+	#python3
+	sudo apt-get update
+	sudo apt-get install python3-pip python3-pil python3-numpy
+	sudo pip3 install RPi.GPIO spidev
+
+demo:
+	sudo git clone https://github.com/waveshare/e-Paper
+	$(MAKE) -C e-Paper/RaspberryPi\&JetsonNano/c/ clean
+	$(MAKE) -C e-Paper/RaspberryPi\&JetsonNano/c/
+	cd e-Paper/RaspberryPi\&JetsonNano/c/ && ./epd
+

+ 2 - 0
config.mk.j2

@@ -0,0 +1,2 @@
+
+RASPI_IP?={{ RASPI_IP }}