Go Down

Topic: initiating a program using a keyboard button? (Read 421 times) previous topic - next topic

DanLo1108

Hey guys,

I've written some code that I want to run when some input, like a key on the keyboard, is pressed. I'm not sure how to implement this.

Ideally, I'd like to run this simultaneously with processing so that both programs start doing their thing at the same time. So I press a button, and my audio (arduino) and visual (processing) begin running at the same time.

Thanks!

liudr


Hey guys,

I've written some code that I want to run when some input, like a key on the keyboard, is pressed. I'm not sure how to implement this.

Ideally, I'd like to run this simultaneously with processing so that both programs start doing their thing at the same time. So I press a button, and my audio (arduino) and visual (processing) begin running at the same time.

Thanks!


I have not programmed in Processing for a while but I remember there is a keyboard class that can capture keyboard input. If you use that and send to arduino a command via serial port, you can control arduino.

Go Up