pin setup, some work on serial parser