[PIC] i am trying to operate air conditioner with pic 18f4550 and sim900 help!

Status
Not open for further replies.
What is the actual problem ? What Compiler are you using ?

In your code I don't see any code piece which operates the relay controlling the AC. Do you just want to turn ON/OFF AC using SIM900 and a microcontroller ?
 

sorry,
i am using mikroc a IR led to control the air conditioner and its working,
my problem is when the pic communicate with sim900.
i try to explain with this line:

pic send:AT+CMGF=1
sim900 send:OK
pic send:AT+CMGDA="DEL ALL"
sim900 send:OK
"when sim get sms"
sim900 send:\r\n +CMTI: "SM",1 \r\n
pic send:AT+CMGL="ALL"
sim900 send: \r\n +CMGL: 1,"REC UNREAD","+972542230352","","14/09/23,21:11:21+12" \r\n
ACON(sms content)\r\n

OK

after sim900 send "\r\n +CMTI: "SM",1 \r\n"

nothing happen, if i`m using a pc terminal to send commands to pic (instead the sim900)
everything work fine
 

You have to issue "AT+CMGR=1\r\n" to read the message at index 1. You have to parse the SMS and make decisions based upon data in SMS.
 

For your method AT+CMGL=ALL is ok because you are deleting all messages initially and so the index will be pointing to 1 but it is good to use AT+CMGR=x and read only the required SMS.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…