RITRedbeard
Posts: 22
Joined: Mon Aug 01, 2011 6:02 am
Contact: Website

Re: Mouse and keyboard over GPIO?

Tue Oct 18, 2011 7:22 am

In an interest of saving the USB ports, is there a method for Linux to hook up mouse and keyboard over GPIO/as serial devices?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23869
Joined: Sat Jul 30, 2011 7:41 pm

Re: Mouse and keyboard over GPIO?

Tue Oct 18, 2011 7:33 am

Personal opinion only, but I think the work involved in doing this would be extensive - much cheaper to buy a hub!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Re: Mouse and keyboard over GPIO?

Tue Oct 18, 2011 7:44 am

It might be worthwhile if:

a - you have a useful serial input device (The "stowaway" serial keyboards for Palm etc spring to mind, given the size of the Pi)
b - you have an input device that uses a non-USB connector and which can't be connected as a HID device using any reasonably priced adaptor (think Model M or TSO workstation keyboards, ADB-connected Wacom tablets, etc)

Basically, if you have a device that you absolutely *must* have connected and which can't plug into a USB hub one way or another. Of course, you'll need to know the protocols used by the device, you'll need to protect the Pi's GPIOs on the physical side, (not that we know how many there will be yet) and you'll need to write and maintain a kernel-side driver for the device.

Not easy, in any sense of the word.

Simon

User avatar
ukscone
Forum Moderator
Forum Moderator
Posts: 4155
Joined: Fri Jul 29, 2011 2:51 pm
Contact: Website

Re: Mouse and keyboard over GPIO?

Tue Oct 18, 2011 12:12 pm

i'll be looking at using keyboards from old computers (Camputers Lynx, Tandy Model100,....) on my Raspberry Pi (when I get one) so using GPIO and the gpio-keys kernel module will probably be the easiest way to go.

User avatar
TonyD
Posts: 447
Joined: Thu Sep 08, 2011 10:58 am
Location: Newcastle, UK
Contact: Website

Re: Mouse and keyboard over GPIO?

Tue Oct 18, 2011 12:54 pm

You could bit-bash a PS/2 interface using the GPIO. The GPIO is 3.3V and PS/2 is a 5V interface so you'll need to have some 3.3V to 5V signal conversion going on and you'll need to find a PS/2 keyboard and mouse.
Tony

Return to “Other projects”