Watch Queue
Queue
Watch QueueQueue
The next video is starting
Loading...
Loading...
Loading...
Loading...
I have found a lot of really great tutorials on lighting LEDs on the Raspberry Pi through the GPIO pin array using Python. I wanted to share my experiences doing the same but with Java and the Pi4J framework and using the browser to activate the LED.
UPDATE: We work more with the Pi4J Library in the next video: https://www.youtube.com/watch?v=NMR_2...
To follow along with this video, you'll definitely want to check out the Pi4J website. The website includes a key diagram that we'll use for creating a simple circuit on the Raspberry Pi with only one LED. You'll also find documentation on the framework, among other helpful information.
The Pi4J Project:
http://pi4j.com/
Simple LED circuit Wiring Diagram:
http://pi4j.com/example/control.html
Pi4J Documentation:
http://pi4j.com/apidocs/index.html
In order to properly build the project on the Raspberry Pi, you'll want to have Maven installed. There are some automated ways to install Maven on the Raspberry Pi, but I prefer the manual method. It's quick and painless, and it avoids downloading and installing a large volume of supporting packages. Check out my Maven on Raspberry Pi Video:
https://www.youtube.com/watch?v=czT2-...
Spring Boot is also key to this project. It not only enables us to get a Java application up and running quickly, but it quickly helps us wire up some REST controllers and embeds Tomcat into our project so that it can accept web requests. Since we are using the browser to activate our LED, Spring Boot's assistance really gets us what we need quickly.
For help with Spring Boot, check out my Spring Boot tutorial on getting Spring MVC up and running quickly:
https://www.youtube.com/watch?v=n96dN...
You'll notice a slightly embarrassing stumble on my part. Not too great, but it will give some of you newbies a look at how to recover, adjust, rebuild and redeploy your application to correct issues.
I highly encourage you to write the code yourself to get a feel for what it entails, but you're welcome to check out the code that I just submitted specifically for this video. You can check it out this way:
git clone https://github.com/mchandler/pi4led.git
Or just go ahead and browse the public repository:
https://github.com/mchandler/pi4led
I really appreciate you watching this video. Don't forget to LIKE and SUBSCRIBE. It's hugely helpful to me. Thanks so much!
Check out more with Pi4J in our next video: https://www.youtube.com/watch?v=NMR_2...
Join our Facebook Community:
http://www.facebook.com/techzonk
Follow us on Twitter:
http://www.twitter.com/techzonk
Loading...
Working...
Loading playlists...
Comments • 13
Pi4J-> GPIO Control Example ... started. "Aug 24, 2015 4:03:19 PM com.pi4j.util.NativeLibraryLoader load SEVERE: Unable to load [libpi4j.so] using path: [/lib/libpi4j.so] java.lang.IllegalArgumentException: The path has to be absolute, but found: \lib\libpi4j.so" when compiling- Can some one help here please