Help for programming

Hello, I'm beginner in programming, and I look for a function that can detect and warn a power outage. I have the necessary equipment. Please Help me.

Pourpoin:
I have the necessary equipment. Please Help me.

What necessary equipment that you have?

I Have battery, GSM Module, arduino board, LED, I have a little bit of everything…