- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need, basically, a state machine with 3 different states:
- no person detected
- person detected, no message sent
- message sent
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').
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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