In this video, I'll use a browser to send requests to the Raspberry Pi to interact with the LEDs on a PiFace. To do this, I'll use Java and the Pi4J library.
Before you get too far with the PiFace on Raspberry Pi, you'll definitely want to make sure that you enable SPI (Serial Peripheral Interface) drivers on the Pi. The following video shows you how to do that:
• Pi4J and PiFace - How to enable SPI on Ras...
You'll definitely want to be up to speed on creating a Java project with Spring Boot for Spring MVC web services and embedded Tomcat. The following tutorial will help you out:
• Spring MVC Up and Running Fast with Spring...
Follow along with the video to produce the code for this exercise. Alternatively, you can check out the code that I produced in this video via Github:
https://github.com/mchandler/pifacete...
When the time comes to build your project on the Raspberry Pi, you'll definitely want to make sure you keep these commands handy when you're logged in to the Pi:
mvn package
sudo java -jar /path/to/jar
Unfortunately, careless typing resulted in my naming one of me endpoints improperly. As a result, I could not demonstrate the pulse action of the LEDs. If you check out my code from Github, be sure to correct that error in your local copy of the code for better success!
Thanks for watching this video. Please remember to LIKE and SUBSCRIBE!
Join our Facebook Community:
/ techzonk
Follow us on Twitter:
/ techzonk