Pages: [1]   Go Down
Author Topic: initiating a program using a keyboard button?  (Read 367 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 72
Posts: 7183
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Pages: [1]   Go Up
Jump to: