Worried about saying the obvious.... but have you ever used an Arduino? If I were doing what your doing; my initial tool would be an Arduino...

Apologies in advance if that is a useless comment.