From the course: Raspberry Pi: GPIO

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Java control of GPIO

Java control of GPIO

From the course: Raspberry Pi: GPIO

Start my 1-month free trial

Java control of GPIO

- [Instructor] Java is a must-have language for anyone with aspirations for a career in computers. Java teaches the use of structure to keep code understandable and maintainable. Not surprisingly, Raspberry Pi provides a way to use Java to program the GPIO. Let's take a look. Your Raspberry Pi should have a copy of Java already installed, but confirm it anyways. To do that, open up a terminal window and type in DPKG dash dash get dash selections, and then a vertical bar, grep for JDK. In this case, the command returns the fact that I've got Oracle Java8 JDK already installed on my machine. So I'm good to go. However, if you don't have Java, you'll need to install it. You can do so with sudo apt get install Oracle dash java eight dash JDK. This command will install Oracle Java8 on your Raspberry Pi. Java requires a library to communicate with the Raspberry Pi GPIO, and the most common and popular…

Contents