O'Reilly logo

JavaFX Essentials by Mohamed Taman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The switch application

The switch application is very simple in its nature, but the idea is mainly divided into two main points: how to run JavaFX 8 applications on Raspberry Pi and how to control the outside world from the Raspberry Pi General-purpose input/output (GPIO). We will use a project called Pi4j for such purpose.

The idea is simple; we are going to create a JavaFX application that will act as a switch controller to control a LED associated to an electrical circuit connected to your Raspberry Pi.

The following screenshots show the application in the ON and OFF states:

The switch application

Switch Application ON state

.

Switch Application OFF state

What is the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required