This is the code that will run on the Arduino.