 <p>The code you have isn't for the Arduino but is written in a language called Processing. It will run on your PC and collect the data from the Arduino to be saved to a file. You need to download the <a href="https://processing.org/download/" rel="nofollow">Processing IDE</a> to compile the code and run it.</p>