Well still struggling with code, the below code to push a button and send a SMS.
// #########################################
buttonSendState = digitalRead(button_Send_onPin);
if (buttonSendState != lastButtonSendState) {
if (buttonSendState == HIGH && lastButtonSendState == LOW) {
buttonSendCounter++;
} else {
if (LSMS.ready())
{
LSMS.beginSMS(numSend);
LSMS.print("button Send pressed");
}
LSMS.flush();
}
}
lastButtonSendState = buttonSendState;
//###########################################################################################
I know the button is wired correctly, if I send a SMS to it will trigger a auto-reply with the buttonSendCounter++ content so if I press the button the variable stored number adds up counting the presses.
How do I send a SMS when that button is pressed ???
Any help is welcomed!