GSM sending message continuously in my project. Where and how to modify it...???

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable
        Hi all, My project is to s   
0 Likes
4 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You need to issue the API ScanSensor() in your for-loop and check for IsBusy() until not busy any more. Have a look into the PSoC4 Proximity example.

   

The name of the sensor is "CapSense_1_SENSOR_PROXIMITYSENSOR0_0__PROX", use names only from CapSense_1,h

   

Afaik we asked you to write down what you expect to happen when the first sms is sent.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Actually my requirement is to send message if person is detected. But it is sending message after every 5sec delay. What Should I do so thst I will get messsge after human detected.

   

Please help me bob.

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

You need, basically, a state machine with 3 different states:

   
        
  1. no person detected
  2.     
  3. person detected, no message sent
  4.     
  5. message sent
  6.    
   

the transitions are with the following conditions:

   
        
  • 1->1: when no-one is detected
  •     
  • 1->2: when someone is detected
  •     
  • 2->3: when the message has been sent
  •     
  • 3->3: when a person is still detected
  •     
  • 3->1: when no-one is detected anymore
  •    
   

when state 2 is reached you send out a message. So this state is temporarily and might be skipped at all (then the transition is just between 'no-one detected' and 'someone detected', and the message is send when going to 'detected').

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You should think over, how many sms you are going to send within which time. Assume that the detected person leaves the area, comes back, leaves... which would result in sending several smsses (what is the plural of "sms"?) . I would build in a 5 minute time of not sending another sms which can be realized easily with a timer component, an interrupt that counts the timer events and a flag that is reset and set in the appropiate places.

   

 

   

Bob

0 Likes