"Serial Keyboard"? What is it? I could not explain with simply one sentence, so first of all, let me tell you the origin of my idea:
As a 125KHz RFID reader module, RDM6300 communicates directly through serial ports. Its good stability and efficiency makes it being widely applied to identification. Based on identity uniqueness, each item has its own exclusive ID, the amount can be enormous. If we place similar ID tags as picture 1 inside some items such as toys, clothes, shoes, etc., they can not be distinguished by appearance at all. How to solve this problem? I thought out a way that attach ID number to each items for easy identification.
Now the problem is how to send the read ID number to printer or specified input box? This is what we are going to do next- "serial keyboard".
HardwareHardware requirements are simple, one or more ID tags, a RDM6300 and a USB serial board, where we use a Foca.
RDM6300 Foca
TX → RX
RX → TX
V → V
G → G
RDM6300 operating voltage is 5V, put Foca's switch to 5V, then link Foca to your computer with a mini USB cable, no programming is needed in this process.
If you use Arduino UNO, then just give UNO programming an empty program: void setup {} void loop {}
Note that the wiring has changed.
RDM6300 UNO
TX → TX
RX → RX
V → V
G → G
Because atmega328’s TX is serial port chip RX, atmega328’s RX is serial chip TX, you can google it by yourself.
After completion of the above steps, you must test if the card number can be read normally. Please follow the below steps to test: open any serial monitoring software or Arduino IDE, select the correct serial number, the connected serial port numbers can be seen in the "Device Manager", put the ID tag into RDM6300 copper coils, if the serial port can print out ID card number, the hardware has no problems.
Next you only need to install 3 software to achieve reading data from specified serial port and simulate keyboard inputting, currently it only supports upper and lower case letters and numbers, other characters are substituted by "* ".
Download and Install the Software under Software Directory:·python-2.7.9.msi·pywin32-219.win32-py2.7.exe·pyserial-2.7-1_py27.exe
After completing all installations, you can use Notepad to open “SerialKeyboard.py”, modify the serial numbers to device serial numbers, port = "COMX". Then save the modified numbers and double-click to operate SerialKeyboard.py. If the specified port does not exist, the program will flash back.
Analog Keyboard InputWhen the running screen shows "Waiting for data …", then we just positioning the mouse in some text input box, such as micro office, notepad or chat window, etc. Put ID tags into coil attachment, you can see the input box continuous inputting the ID tag number. "* "means space character here.
With this, we realized serial keyboard input. You can also modify py files code according to your actual needs.
Ctrl + C or click the close button on the window’s upper right corner.
Comments
Please log in or sign up to comment.