NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » How could I send keyboard events to my computer with my NerdKit?

January 01, 2011
by rboggs10
rboggs10's Avatar

Let's say I press a button on my NerdKit and I want it to send a keyboard character just as it would if I had a real keyboard on my computer. How would I do that?

January 01, 2011
by Rick_S
Rick_S's Avatar

Since your Nerdkit is attatched to the computer as a serial device, it won't in it's normal configuration act as a keyboard. You could write software to mimic the PS2 protocol and make it work that way in theory, but I haven't done it.

Rick

January 01, 2011
by mongo
mongo's Avatar

If you are running a terminal program on the PC, you can get input from the NK just like a modem. You can also set the computer up to take commands through the port as well by the DOS command MODE but I am not sure if it still works on the newer operating systems. I think it was MODE CON:COMx (x being the port)There is also a bit of test that follows like baud rate, data bits and so on. I think it defaults to 8n1.

January 01, 2011
by Ralphxyz
Ralphxyz's Avatar

Could you clarify your question?

  1. "Let's say I press a button on my NerdKit" Ok you have a momentary button hitting one port on the Nerdkit correct?

  2. "I want it to send a keyboard character" To where? Where do you want the "character" to appear? On the Nerdkit LCD or on a computer?

Have you looked at the [Interrupts and PS2 keyboard tutorial? Is that what you are trying to do?

Ralph

January 01, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi rboggs10,

This sounds like a neat project idea. I think what you basically want to do is what we did in the PS/2 Keyboard tutorial, just backwards. We use the NerdKit to interpret keystrokes from the keyboard in that project, you are going to want to instead send the keystroke signals to to a computer to interpret them.

Humberto

Post a Reply

Please log in to post a reply.

Did you know that NerdKits has been featured in the MIT Undergraduate Research Journal? Learn more...