How to detect a Raspberry Pi button press in Processing?

edited April 20 in Raspberry PI

Hi folks!

Here’s my situation: I have a RPi 1 B+, successfully running Processing thanks to this resource: http://scruss.com/blog/2014/01/07/processing-2-1-oracle-java-raspberry-pi-serial-arduino-☺/

I’ve gotten Processing to recognize the Pi’s Serial Input thanks to this: http://www.raspberrypi-spy.co.uk/2013/12/free-your-raspberry-pi-serial-port/

I’ve used Adafruit’s Retro Gaming Controls tutorial to connect buttons (I only need two, simple buttons) directly to the Pi: https://learn.adafruit.com/retro-gaming-with-raspberry-pi/buttons

Finally, I’ve connected a button and confirmed that the RPi is seeing the button press using this simple Python script from O’Reilly: http://razzpisampler.oreilly.com/ch07.html

The remaining problem, then, is that Processing can’t see any button input.

As mentioned elsewhere, Gohai has brought up the idea of RPi support, including GPIO recognition -- which would be exactly what I need, too bad I can’t wait: http://forum.processing.org/two/discussion/9658/gsoc-2015-proposal-raspberry-pi-and-armv7hf-support

So, is the only way to do this NOW by using an Arduino to handle the buttons and pass that back to Processing? And if so, can someone point me in the right direction to do so?

Sorry for all the links; I’m not trying to promote them, I just thought it would help if people could see where I was coming from. THANK YOU!

Tagged:

Answers

Sign In or Register to comment.