refactor arduino process values