Partially start implementation of input commands for sensors, refactoring partially done to reduce duplication when converting command instructions into bytearrays for the chosen interface.