Low frequency square wave in arduino

As for writing your code for you, you'll find some guidance here:

The forum has a for-hire section where you can pay someone to do the work for you, should you wish.