refactoring
ECMD commands refactored and Direction command removed
switched to correct analog comparator port, Refactoring, removed unnecessary comments