About
HowTo's
Hotspots
Products
Reviews
News
Click on the flag below to change the language of the text on these pages.
Stats Box -
keyboard encoder
HostChoice.net: keyboard encoder
Posted in: Code | by HostChoice.net | 2018 June 20
Arduino Duemilanove
Hello all,
This is the test code for a keyboard encoder
Arduino sketch to read data from 5 pin din
Thanks!
Code: [Select]
// code 232565898 // ********************************* // * Program By Michael S Holden * // * 5/21/2011 * // * Program Name "serialkeyboard" * // ********************************* /* https://forum.arduino.cc/index.php?topic=61820.0 This program was written to interface the EDE1144 Keyboard Encoder chip to the Arduino micro controller. Pin "0" on the Arduino is used to intercept incoming serial data. The EDE1144 chip does all of the grunt work for the interface. Please remember that I/O pin 0 and pin 1 on the Arduino is used to upload sketches to the controller and you must unhook the keyboard first. This EDE1144 Keyboard encoder will handle up to 16 keys and was designed to use with a HEX board. It has built in debounce, delay repeat and several features I did not use. */ #include
// initialize the LCD library with the numbers of the Arduino pins used LiquidCrystal lcd(3, 2, 4, 5, 6, 7); //LiquidCrystal(rs, enable, d4, d5, d6, d7) char inkey = 0; // receive incomming serial data // soft incoding for numbers void setup() { Serial.begin(9600); // use com port to communicate with the keyboard pinMode(2, OUTPUT); pinMode(3, OUTPUT); lcd.begin(20, 4); //20 colums and 4 rows lcd adopt your lcd to this digitalWrite(2, LOW); digitalWrite(3, HIGH); lcd.setCursor(0, 0); lcd.print("Keyboard ready"); } void loop() { // Trap serial data only if (Serial.available() > 0) { inkey = Serial.read(); show(); } } void show() { if ( inkey == 49) { inkey = 1;} // converts keyboard 49 to number 0 if ( inkey == 50) { inkey = 2;} if ( inkey == 51) { inkey = 3;} if ( inkey == 53) { inkey = 4;} if ( inkey == 54) { inkey = 5;} if ( inkey == 55) { inkey = 6;} if ( inkey == 57) { inkey = 7;} if ( inkey == 65) { inkey = 8;} if ( inkey == 66) { inkey = 9;} // inkey == 68) inkey = "*" if ( inkey == 69) { inkey = 0;} //if inkey == 70) inkey = # lcd.clear(); lcd.print(inkey, DEC); }
We at HostChoice.net believe the internet should be fun and safe.
Thank you for choosing HostChoice.net...
code
code Home
pir control relay
BluetoothLCD
lcdkeypad
keyboard encoder
rfid2
rfid
pi.ard.watchdog
DK-bluetooth controlled relay
DK-bluetooth controlled relay
DK-bluetooth controlled relay
DK-bluetooth controlled relay
DK-bluetooth controlled relay
DK-bluetooth controlled relay
bluetooth controlled relay
bluetooth controlled relay
bluetooth controlled relay
hdsp211x
accelerometer
All Rights Reserved. All Images and Programming are
Copyright 2024 by HostChoice.net
.
Site Map