Question

I´m intending to build some java apps to be run on a raspberry pi, the main thing is that I intend them to be used with a touchscreen (not too expensive of course)

I´ve been reading about SPI communication an GPIO also, but I still have some doubts.

Can I use the SPI ports and the GPIO to both control and connect the touchscreen to the board? in this case, Is "everything included" on raspbian? (Let me explain that) if you use the standard HDMI, my JVM will interact with raspbian to control the screen (as a standard computer screen) and the same with the touch events coming from the USB. But, as I´m not using these ports, Will I need any special libraries to be installed on raspbian? and of course, Are any?

The main problem is that I've found some libraries on c (for certain screens) but I will like to use java. If not, I will try to implement any kind of "system calls-like" interface with both java for the apps and c for the events and screen drawing.

Does all the things that I´m typing make sense?

Thanks a lot. I will appreciate any help.

Was it helpful?

Solution

yes your RaspberryPi can work with touch-screens, use JavaFX/OpenJFX. Note - you will need a compatible touch screen device (some of which are listed in the link below)

See: https://wiki.openjdk.java.net/display/OpenJFX/OpenJFX+on+the+Raspberry+Pi

There are numerous articles which explain how to handle touch events with JavaFX/OpenJFX so hopefully using the API wont be too much of a problem.

Hope that helps :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top