Skip to content

Commit b21525b

Browse files
committed
Original Readme for V1.0.2
Brief outline on the simple PS2 Keyboard library for Arduino tested on Uno, Mega 2560 and Due.
1 parent 220e488 commit b21525b

File tree

1 file changed

+52
-1
lines changed

1 file changed

+52
-1
lines changed

README.md

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,53 @@
11
# PS2KeyRaw
2-
Arduino PS2 keyboard interface light footprint all bytes from keyboard
2+
##Arduino PS2 keyboard interface light footprint all bytes from keyboard
3+
4+
First Public Release Version V1.0.2
5+
6+
Smaller footprint than any others found
7+
8+
For other versions that convert the up to 8 byte keycode sequences to a single integer for all keyboard types or allow you to get the full UTF-8 configurable for any LATIN keyboard with extra functions keys as simple codes see associated reporitories for PS2KeyAdvanced and PS2KeyMap libraries. Yes these libraries even provide codes for multimedia keys and Function keys F1 to F24 (yes that is F24).
9+
10+
###Platforms
11+
12+
- Arduino AVR - tested on Uno and Mega 2560
13+
- Arduino SAM - tested on DUE
14+
15+
###Test Environment
16+
- All platforms versions of test R3 Hardware
17+
- Arduino V1.6.7
18+
- DUE Board Manager package V1.6.6
19+
20+
##Important Hardware Notes
21+
1 Make sure you have data and clock wires connected correctly. Clock wire MUST be connected to an interrupt pin.
22+
- Do NOT use Pin 13 for either clock or data wires
23+
- PS2KeyRaw requires both pins specified for begin() as in keyboard.begin( data_pin, irq_pin );
24+
- Valid irq pins:
25+
- Arduino Uno: 2, 3
26+
- Arduino Due: All pins, except 13 (LED)
27+
- Arduino Mega: 2, 3, 18, 19, 20, 21
28+
- Teensy 2.0: All pins, except 13 (LED)
29+
- Teensy 2.0: 5, 6, 7, 8
30+
- Teensy 1.0: 0, 1, 2, 3, 4, 6, 7, 16
31+
- Teensy++ 2.0: 0, 1, 2, 3, 18, 19, 36, 37
32+
- Teensy++ 1.0: 0, 1, 2, 3, 18, 19, 36, 37
33+
- Sanguino: 2, 10, 11
34+
35+
2 When using DUE or other boards with 3V3 I/O you *MUST* use a level translator FET or IC like Texas Instruments TXS0102 or similar as most keyboards not only operate at 5V but the two wire communications are pulled up by a resistor to 5V at the keyboard end
36+
37+
###Introduction
38+
39+
After looking round for suitable libraries I found most were lacking in functionality and high in code and data footprint, so I created a series of PS2 Keyboard libraries. The first here is the simplest one suitable for testing your keyboard hardware and understanding what keyboard protocol is.
40+
41+
The PS2 Keyboard interface is still needed for systems that have no USB and even if you have USB, you want it left for other uses.
42+
43+
The PS2 Keyboard interface is a *Bi-directional* two wire interface with a clock line and a data line which you connect to your Arduino (see above), the keyboard protocol has many nuances all of which are used in the other libraries of this series. this library allows you to access the keycodes sent from a keyboard into its small buffer and read out the codes with simple methods
44+
- available() return count of bytes waiting
45+
- read() return next byte in keycode buffer
46+
47+
###Installation
48+
49+
Perfoemed by standard zip file library inclusion into Arduino IDE
50+
51+
###Examples
52+
53+
This library has ONE example, SimpleTest that uses the serial port to output the codes received on every keystroke and auto-repeat, some keyboards change codes on auto-repeat; which you will be able to see for yourself.

0 commit comments

Comments
 (0)