You probably could look into serial communication. There are a couple of threads on this forum doing that like