|  | @@ -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
 | 
	
		
			
				|  |  | +
 |