Arduino code for bipolar squarewave generator