Go Down

Topic: using Keypad library for a full QWERTY keyboard (Read 7 times) previous topic - next topic

mclien

#30
Feb 15, 2012, 04:45 pm Last Edit: Feb 15, 2012, 04:48 pm by mclien Reason: 1
Yes exactly. I'm a newbe to that, so I didn't know if the analog pins are useless and I only can could the digital ones.

and I'm not a native english speaker so that add some difficulties in understanding the stuff (and ma lead to some questions that might sound silly and unnessessary)

liudr


Yes exactly. I'm a newbe to that, so I didn't know if the analog pins are useless and I only can could the digital ones.

and I'm not a native english speaker so that add some difficulties in understanding the stuff (and ma lead to some questions that might sound silly and unnessessary)


To expand this topic on analog pin ideas, I think you can connect a few resistors to the row pins like that of the analogbuttons and use column pins to drive low and sense with analog inputs. What do you thing, mstanley? 4 digital pins and 1 analog pins for a 4*4 keypad? I'll whip out the code with my phi_interface library, which already contains analog keypads but of a different type.

mstanley

Quote
To expand this topic on analog pin ideas

I think I would like to but maybe we should start another thread for that.  It could be pretty scary for newbies.  :)

Quote
What do you thing, mstanley? 4 digital pins and 1 analog pins for a 4*4 keypad?


LoL... I thought of that, too.  It sounds like a pretty fun challenge.  But for shipping code it would probably just be best to have the library identify that the user is connected to the analog pins and have the library reconfigure them for digital when needed.

liudr


Quote
To expand this topic on analog pin ideas

I think I would like to but maybe we should start another thread for that.  It could be pretty scary for newbies.  :)

Quote
What do you thing, mstanley? 4 digital pins and 1 analog pins for a 4*4 keypad?


LoL... I thought of that, too.  It sounds like a pretty fun challenge.  But for shipping code it would probably just be best to have the library identify that the user is connected to the analog pins and have the library reconfigure them for digital when needed.



Yep! Will do once I get it to work. All I have now is a "matrix keypad" with multiple analog inputs, each with a number of keys hooked to it. This hybrid keypad will be more useful since you can just buy a matrix keypad and not having to construct a special keypad to use analogButton lib. I have been aching over the ATMEGA328P lacking of I/O pins for a while. I was trying to make a phi-panel out of GLCDs. They take 13 pins so 5 left if I do serial panel. I guess I've just found my way to handle that with analog/digital hybrid keypad. Awesome! Finding solutions or learning stuff every day is great!

mclien

#34
Feb 16, 2012, 08:57 am Last Edit: Feb 16, 2012, 03:20 pm by mclien Reason: 1
FYI, the matrix of the Palm portable Keyboard (US-Layout), which I plan to re-use with the teensy:
Code: [Select]
       "c1"    "c2"    "c3"    "c4"    "c5"    "c6"    "c7"    "c8"    "c9"    "c10"   "c11"   "c12"
"r1"    "4"                     "c"     "r"     "f"     "8"     "u"     "j"     "m"
"r2"    "5"                     "v"     "t"     "g"     "9"     "i"     "k"     ","
"r3"    "6"                     "b"     "y"     "h"     "0"     "o"     "l"     "."
"r4"    "7"                     "n"     "` ~"   "space" "space2"        "p"     ";"     "done"
"r5"    "1"     "Caps"  "Del"           "cmd"   "x"     "-"     "["     "„""    "/ "            "Shft L"
"r6"    "2"     "tab"   "left"          "q"     "a"     "+"     "]"     "enter" "up"            "shf R"
"r7"    "3"     "ctrl"  "down"          "w"     "s"     "BckSpce"       "\"     "ToDo"  "Memo"  "Fn"
"r8"    "z"             "right"         "e"     "d"     "Date"  "Phone"                 "alt"

So what do you think liudr? 12 digital and 1 analog pin for that, or are 8 steps to narrow for an analog pin?
But I could also live with the use of a "full" matrix of 20 I/O pins (so I can still leave out the RX/TX pins and have 2 pins left to drive a LED, if I want to)
And don't be confused by some strange Labels: There are some extra keys on that keyboard that where designed for the use with a Palm device, but could be perfectly reused as extra/media/F keys.
Once the hardware is working its just a metter of assinging the keys and perhaps do some work with xmodmap (at least when using GNU/Linux).

EDIT:
I was just surfing hackaday:
http://hackaday.com/2012/02/15/building-a-keyboard-from-scratch/
(haven't read all links, but it was mentioned he used a teensy++2.0 and "existing libraries". maybe it's worth alook?)

Go Up