I tried to use the Millis() function from the Blinking Led example but the output doesn't stop to be HIGH and LOW with a period of 1.2 min.
How can I do?
Using millis() to record when the pin was set HIGH, and then setting it LOW at some later time is the correct approach.
If it failed to work, it is because you didn't turn the pin off at the right time.
Post the code that you are using, and we'll help you figure out what the problem is.
Alternatively, the hard work has been done for you.http://www.arduino.cc/playground/Code/TimedAction