We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi to everyone, i'm newer in Processing forum
I would send a char via serial when i push a key on my keyboard, but if i don't release, processing mustn't continue to send that char! Processing must to send a char only if i'll press a new key.
could you help me?
Thanks in advance.
sumo is serial!
Answers
Keep track of whether each key has already been pressed in a boolean. Only send the char when the boolean is false. Set the boolean to true in keyPressed() and to false in keyReleased().
A good example of boolean flags:
http://studio.processingtogether.com/sp/pad/export/ro.9bY07S95k2C2a/latest