really quick question

sorry, but i lost my mind looking for how to do this:

i wanna press a button on my keyboard while the arduino is connected via usb, and when i press a button on the keyboard, an action happens, lets say for examples sake, it lights up an led.

now i dont want to type a letter in the serial and press send, i just want to press a button on the keyboard and for it to work.

thanks, and happy new years!

If you're using windows, try puTTY - it allows for serial connections, and sends the raw bytes as you go (you don't have to send it). Mind you, unless you write something up for the arduino, it doesn't echo your input.

If you're using OSX/Linux it's even easier. From terminal, type:

screen /dev/tty.(yourarduinotty) 9600

and type away. I say it's easier because you can just | things into /dev/tty.whatever. This makes it useful for creating shortcuts with your apple key, and not having to have any application open to do it. I wrote a sketch that toggled power to my air-con whenever I pressed Apple Key+Shift+A.

  • plasma