Penguin Tiny Keyboard
Penguin Robot
(Penguin Menu) Tiny Keyboard
by humanoido
Tiny Seven Function Keyboard with Adjustable Debounce
Shown above is a tiny blue reset button. The code changes this button
into a full seven function keyboard, capable of acting as a menu, start
/stop key, message center, debugger, or any number of uses!
Introduction
This is a seven function keyboard for Penguin Robot.
It uses no additional parts. Only the stock Penguin is required!
The trick to getting a keyboard from nothing resides in the conversion
of the single button reset.
Theory of Operation
It only uses 1-key that's already built into Penguin, so no added hardware
is necessary. Like a cell phone, each press of the key has a function.
Code converts each key-press into a character. The characters can be
set to what you want, and there's even a tiny debounce key routine!
Features
The demo code includes a space and the alpha letters A through F.
This could easily be an alpha character, number, word, or text mix.
Typed results appear on the debug screen. You can send these
results to any part of your code for menu use or otherwise.
Applications
The finest application for the Tiny Keyboard is a Penguin Menu.
It allows one to branch to any part of a program based on the number
of times the reset key was pressed.
The Code Details
The Keyboard Encoder is one giant IF-THEN statement. A PAUSE
statement is the Debounce. R/W keeps track of the reset key presses.
Tips
Post Edited (humanoido) : 12/18/2008 2:59:35 AM GMT
(Penguin Menu) Tiny Keyboard
by humanoido
Tiny Seven Function Keyboard with Adjustable Debounce
Shown above is a tiny blue reset button. The code changes this button
into a full seven function keyboard, capable of acting as a menu, start
/stop key, message center, debugger, or any number of uses!
Introduction
This is a seven function keyboard for Penguin Robot.
It uses no additional parts. Only the stock Penguin is required!
The trick to getting a keyboard from nothing resides in the conversion
of the single button reset.
Theory of Operation
It only uses 1-key that's already built into Penguin, so no added hardware
is necessary. Like a cell phone, each press of the key has a function.
Code converts each key-press into a character. The characters can be
set to what you want, and there's even a tiny debounce key routine!
Features
The demo code includes a space and the alpha letters A through F.
This could easily be an alpha character, number, word, or text mix.
Typed results appear on the debug screen. You can send these
results to any part of your code for menu use or otherwise.
Applications
The finest application for the Tiny Keyboard is a Penguin Menu.
It allows one to branch to any part of a program based on the number
of times the reset key was pressed.
The Code Details
The Keyboard Encoder is one giant IF-THEN statement. A PAUSE
statement is the Debounce. R/W keeps track of the reset key presses.
Tips
- Reset Keyboard routine is easily looped to act as
a start and stop key. - Remember to place the specific (as noted in the code) MPP
code at the top of your code.
Post Edited (humanoido) : 12/18/2008 2:59:35 AM GMT
Comments
this is another example of a great result you can get with just a few simple commands !
I've already added it to the Utilities section of the Penguin Web Site: www.p-robot.com/index.php/utilities.html
Thank you for all the work you are doing for our penguins.
Post Edited (vrossi) : 8/21/2009 5:52:20 PM GMT
at many months of PBASIC programming to get an otherwise
lengthy and involved program down to one that's simple and
easy to understand with relatively few program statements. The
goal is to make all code simple as possible, easy to understand,
and provide full documentation of every line.
humanoido