Run processing application on background

edited June 2017 in Arduino

Hello everyone, today I discovered that I can use Processing to communicate my PC and arduino.

I did a simple program:

void setup() { size(displayWidth,displayHeight); myPort = new Serial(this,"COM3",9600); //arduino port }

void keyPressed() { if (keyCode == 37) myPort.write('1');
if (keyCode == 39) myPort.write('0');
}

Basically, when I press the arrow keys, Processing tells arduino to turn on/off a led.

The problem is: I need to do this on background, I mean, now I need to open the executable and press the arrow keys on there, if I'm not on the executable, Processing don't communicate with my arduino. While I'm playing a game on my PC, when I press the arrow keys, Processing should send information to arduino, but it doesn't, because I'm not on the executable file.

Let's see if someone can understand my problem :P

(Pls help)

Answers

  • Your game, is it made in Processing as well?

    Kf

  • Noo, that's the problem, when I'm playing Minecraft and I press the space bar button, the led needs to iluminate, but it doesn't because I'm not on Processing. :(

Sign In or Register to comment.