Got toggle and encoder functions, verified the I/O

need to work on the logic