You are on page 1of 1

Cdigo:

// Envio das mensagens


if(input(PIN_A0))
{
output_high(PIN_B0); //Liga sirene
printf("at\r");
delay_s(2);
printf("at+cmgf=1");
delay_s(2);
putc(13); // (Enter)
printf("at+cmgs=\"+559181678950\"");
delay_s(2);
putc(13);
printf("O sensor da sala foi ativado!");
putc(26); // (Ctrl+Z)
delay_s(300);
output_low(PIN_B0); // Desliga sirene
}

You might also like