i think this problem is so trivial that there is no tutorial that simple.
I have a Arduino Uno and a pushbutton connected to DigitalIn 2.
I want to use the pressing of the button inside my Java Code.
All I need is a Java code that recognises the press of a pushbutton. E.G. Printing out "button pressed". Later I want to use it in an If condition ( if button is pressed, then show image or do whatever)
I read about Jssc and have the library installed. Most tutorials however are about sending data to the arduino