I've been playing with the LCD for a while. Thought that it would a great idea to try to create a game. In the game there should be a car which has to avoid the upcoming obstacles. In order to do that I want to use arrow keys(Up and Down) in my PC keyboard. The problem is that I couldn't find a way to do that properly. I could use the Serial monitor for input, but that would too clumsy because everytime I input a character(arrow up or down) I would have to confirm that by pressing enter. Is there any way to avoid that?
The thing is that I don't have a PS2 keyboard, I have a laptop( forgot to mention that). How I could use my laptop keyboard or do I have to buy PS2 keyboard?
Well, you don't necessarily buy PS2 keyboards new, you get them for a dollar or two at garage sales or "op-shops", or at the recycle depot. Likely for free when you point out they are "obsolete". The purple plug is the give-away.
I don't quite follow what you are planning to do with this laptop keyboard (which presumably is USB)? Is this a dead laptop you are recycling?
The point is that to interface a USB "slave" device to an Arduino, you need a USB "host shield" and it gets absurdly complex.
Paul__B:
Well, you don't necessarily buy PS2 keyboards new, you get them for a dollar or two at garage sales or "op-shops", or at the recycle depot. Likely for free when you point out they are "obsolete". The purple plug is the give-away.
I don't quite follow what you are planning to do with this laptop keyboard (which presumably is USB)? Is this a dead laptop you are recycling?
The point is that to interface a USB "slave" device to an Arduino, you need a USB "host shield" and it gets absurdly complex.
My laptop is fine and I'm not going to strip it only for the keyboard
I'm usually using this laptop to upload the codes to arduino and it's always connected via an USB cable.
I thought that I can use the keyboard (which is in my laptop) to send commands to arduino while the program is running,(I don't want to use serial monitor input line, because after every command I would have to confirm it by pressing enter) but if you say that it is too complex then, I guess, I'll just order a keypad or some custom buttons from ebay and connect them to my breadboard
neiklot:
Try PuTTY, then you don't need to press Enter.
(I just tested it: not sure if it's a setting I may have chosen before, but right now it sends a character as soon as you type it.)
Tried it out, didn't really worked out, maybe I messed up something.
Downloaded the latest version of PuTTy, installed it, turned it on, put in the settings(COM(number) and 9600), opened it. There was written "Testing keyboard" or something like that. I thought everything is fine, so turned on the arduino IDE and tried to upload the code (which worked fine earlier). Got an error message that it timedout.
Watched few videos on how to connect PuTTy to arduino, acording to them everything was in the way it should be.