Hello again my arduino friends!! According to a library i found i've written a code for a simple project. All i need is : in an industrial board when the power is off,arduino sends a message to the user that warns him that the power is off. I want you to see the code and tell me if is correct or not. I use a library that i found in Internet for the gsm sim900. The code is:
int board1 = 7;
Serial.println("GSM Shield testing.");
if (sms.SendSMS("+30693xxxxxxx", "SMS from Arduino OK."))
Serial.println("\nSMS sent OK");
int buttonState = digitalRead(board1);
sms.SendSMS("+306932xxxxxxx", "board1 is off");
Can anybody please tell me if is the code correct??If not what can i change so it will work properly??I think it is a simple project but my programming skill is low cause i am a beginner. Thank you in advance.