pic to turn on and off some devices connected to it.
i need to transmit the temperature read from adc0 to gsm modem, in between some predefined strings.
and also i need to use the string value in 'switch'. How could i do that.
Please help on this.
thanks in advance.
Code: Select all
do
{
if(uart1_data_ready()==1)
read_message(); /*read message from gsm modem*/
switch(message)
{
case 'ON' :relay(1); /*relay is a function that turn on/off a relay connected to pic*/
case 'OFF':relay(0);
}
}while(1)
Eg:"TEMPERATURE =32degree celsius"
Code: Select all
uart1_write_text("Temperature="+txt+ " degree celsius"); /* txt is a character array */