I'm doing a project with an Arduino uno and I'm trying to see if there's a way to connect a USB (type A) keyboard to an Arduino without using an additional controller board. I want to only use a female USB port and some resistors/transistors if need be. The program is supposed to take in keyboard data and output it to the serial monitor. It should be a relatively simple code but I'm stumped by how to setup the hardware. Any tips would be much appreciated!
No, you need an additional controller board, specifically a USB host board - they're also somewhat expensive, and not particularly pleasant to work with.
Older PS-2 keyboards are easier to interface with Arduino.
(deleted)
Only way I can see is if you were to take the keyboard apart, and cut out all the connections from the membranes to the rest of their electronics (you can't solder to the membrane, so you have to cut the traces on the PCB, so you have a bit of trace left to solder to), and treat it like a matrix keypad. Depending on the layout of the board in the keyboard, this modification process itself could be either challenging, or just tedious. I don't know if the Uno has enough pins for that though...
And that won't get you the ability to use an unmodified USB keyboard.
Roble:
Would a Raspberry-Pi be more efficient at achieving this then?
Well you just plug the keyboard in like you would to any computer.
The program is supposed to take in keyboard data and output it to the serial monitor.
Which serial monitor is this then?
This sounds like an assignment?