Checking connection/ communication
Adafruit has a good set of guides to getting started with arduino:
https://learn.adafruit.com/series/learn-arduino

The "Blink" program is the equivalent of "hello world".

When testing you probably should disconnect the Arduino from the 3D printer.