As an alternative to using Raspberry PI as a base there's also
the c.h.i.p., pretty cheap. I'd like to see smartphones use input devices other than touchscreens, personally I've found they've never resulted in accurate input (maybe they're accurate themselves but they tend produce bad input, see: autocorrect having to be a thing).