First version of Arduino code