Application ideas for encorekbd.c
A one-key keyboard may not seem very useful. But what you have
here is a "keyboard wedge", a device which can be attached to a system,
capable of imitating keystrokes or key combinations that a user
could enter. Such a device is often used by barcode
scanners. Following are some additional ideas for this type of
device.
Some (or maybe all) of these have already been done by others but they
would be great DIY projects.
Slide show button:
A small box containing the MCU and a pushbutton could be used for a
situation where you are using a computer for a presentation, and you
want to advance to the next slide without trying to find the right key
in the dark, or wiggling a mouse pointer on the screen. Just
program this device with the proper keycode and you can comfortably sit
back in your chair, or stand up while speaking, working the computer
like an ordinary slide projector
For a variation on this theme, the device could be set up to send a
keypress code periodically, like every 10 seconds, to create an auto
slideshow effect. This mode could be toggled on and off by
pressing the pushbutton. Some presentation software can do this,
but some can't. Remember, this will work for the Mac, and Linux
too.
Joystick That Emulates Keypresses
If you have one of those arcade emulators that runs on a PC, and want
to really simulate the original arcade experience, get your hands on
one of those authentic heavy duty joysticks with bare
microswitches. A repair shop that services arcade games, or some
searching on the net should get you one. You might want some
heavy duty pushbuttons for "fire" buttons.. Connect the four
switches to the MCU, along with required buttons,
and then rework the firmware a little to spit out keycodes that are
correct for each joystick position. The microswitches may
need a different debounce time.
There is a company called ArcadePC
that
takes this concept, and packages a PC in a real arcade style case, and
sells
these for around six thousand dollars. You could assemble one for
probably under $300 and a some woodworking and painting skills,
using an older PC and monitor.
This would also work well for any games that don't have joystick
support. Any platform, provided there is USB support: Windows, Linux,
or MacOS (I could dust off my old copy of Spectre for the Mac).
Dummy keyboard for Embedded Applications
Old motherboards make cheap but powerful embedded CPUs. If you
want to use a generic computer motherboard for an embedded application,
there may be problems when the BIOS doesn't detect a keyboard
connected. Use this
device to emulate a keyboard. It doesn't have to actually do
anything except enumerate. If your motherboard only supports PS/2
devices, you can configure an enCoRe device to communicate with
it. I don't know exactly how this is done, but there is probably
an appnote on the Cypress website.
Watchdog timer for PC
The firmware could be modified so that the device could be used as a
watchdog reset device for a PC running a dedicated
task. The PC would have to periodically send some
data to the "watchdog" device to keep it alive. If the device
doesn't recieve this signal within a set period of time, it would send
the appropriate keycodes to reboot the machine (i.e. for Windows 2000,
this would be Ctl-Alt-Del followed by "s" for shutdown, followed by
Enter).
You must find a way for your application to signal the watchdog device,
which provides evidence that the PC has not locked up. There is
apparently a way to for user space applications to communicate with
keyboard devices under Windows, see Jan Axleson's HID FAQ for specifics.
Alternatively, I believe there is a way in most OSes for a
program to turn the three LEDs on or off on a keyboard, and this might
be an easier way to send the keep alive signal. Search the net
for examples.
Remote Control to Computer Interface
Say you are using a PC as an entertainment center. You might use
it to watch DVDs from across the room. You don't have a remote
control for your PC. Modify the encorekbd firmware so that it
reads the output of an infrared receiver module, decodes the pulses
(you can use a digital scope to figure them out). Then translate
these codes to keypresses to control your DVD application, or
whatever. If a a sequence of keypresses is required, that can
easily be accomplished as well.
Probably has been done already by someone.
Other
You have a device that "looks" like a keyboard. Most computer
applications respond to keypresses. The device is cheap and easy
to build, and (with the right tools) easy to modify. What type of
device can you think of that could make use of these
capabilities?