I can write all the code. But if it would be Android. I guess the proper way would be to send the led-function to a AsyncTask. So it runs in the background as long as the program is runnig. That way, they know when it's halted and pull the plug. Is there a way to do this background task in Java (without Android). The reading of GPIO would be blocking the other thread afaik.
Code: Select all
Application --[GPIO reader (pi4j)] |-[blinking led]
Thanks in advance.