Advice on very simple project for newbie please.

Is it possible to find out the code the arduino needs to do this and simply send it out to the serial port?

This is code that you write on the arduino. It is very simple code, you can find out how to do it by visiting the learning section of this web site.