This appears to work. Now all that remains is doing the rest of the work.
In theory, this will poll the feedback lines, but in practice, it probably crashes or catches on fire or something.