EOS M is a great little camera, but only has the Canon IR trigger for interval and timelapse. Here is a link to an Arduino sketch that outputs IR trigger signals on pins 12, 11, and 10 at 5, 15, and 30 seconds respectively. Designed to run on an Uno board with minimum external components – just change the IR LED + pin to the appropriate pin above for the timing you want. Credits in the code header. Let me know if you have any improvements!