![]() ![]() For what it's worth, mine were: CLK- green, GND- orange, DATA-brown/pink(?), VCC-yellow - red, black and shield were left disconnected (though I should have tied them low). ![]() ![]() PS/2 Male DIN (plus some wire cutters to hack it into the right parts) - I also recommend checking which wire goes to which pin before you start your project.if I'm just playing with a joypad and need the ROM load menu) or I can have full control using my desktop keyboard. The end result is a device that I can plug in, trigger the menu without a computer at all (i.e. My soldering skills aren't great (which also why I'd rather solder my own hack kit rather than more expensive computers), and the task took me a good few hours, but I was rather pleased with the outcome. I also wanted two shortcut buttons for neptUNO specific functions (the core menu and the "scandoubler" key) and because I had two chunky push buttons to hand. This all worked perfectly, so it was time to move on to Prototype Three - the semi-permanent soldering of the board and connected to a male PS/2 connector so I could disconnect and reconnect easily. In addition to mapping modern codes to scan codes, I also added the ability to define keys as buttons (so that I could use the page on my mobile device) and added some relatively simplistic heartbeat checking so that if the connection is lost (due to a power cycle of the neptUNO) the web page would automatically reconnect. Thankfully the web archive has kept an old webpage containing a table of scan codes that I mapped to de from the key down and key up events. For example, typing the letter "G" (uppercase) is a sequence of: shift down, g down, g up, shift up. Since the browser object model gives me events for key down and key up, these map perfectly to how the PS/2 scan codes work. As you might have seen from the video demo, I can use a browser - on any device - to send remote key press commands. The cleverness is added with the browser. I would also go on to upgrade this to include: serve a single HTML page on port 80 of the device. On WebSocket message, forward each byte in the message to the PS/2 clock and data lines.Configure output pins for clock and data lines for PS/2 connection.Connect the ESP to my local wifi network.The code on the D1 mini comprised of the following (and I'll include the full source at the end): The wiring is relatively straight forward and the arduino code required is partly lifted from existing example code and partly me making small adjustments. That WebSocket would then, in theory, forward keyboard scan codes to the PS/2 connection. I had a few ESP based WEMOS boards from failed previous projects and decided that I would use my D1 Mini and program it to accept a WebSocket request. It might have been enough to have a couple of hardcoded buttons for things like F12 (which brings up the core menu), but I wanted some freedom and I wanted to be able to type. The next part was how would I send the scan codes. Then I wired my arduino directly into the PS/2 port and turned on the neptUNO to test - immediately the menus were moving up and down: this means the entire thing had legs. I used a library called ps2dev to send a clock and data signal for the up and down keyboard scan codes. I've published 38 videos for new developers, designers, UX, UI, product owners and anyone who needs to conquer the command line today.īut do have a read too, it was fun to make :) Demos firstĪfter seeing Ben Eater's video on PS/2 keyboards I knew that the scan codes for a keyboard should be re-creatable with something like an Arduino. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |