Dear Members,
I want to wake up the chip whenever there's a radio signal from ANT sensor without pushing a button,
Will this function sd_app_evt_wait() help ?
I put at the end of the loop,
So far I need to push the button to wake up the chip,
Thanks
Dear Members,
I want to wake up the chip whenever there's a radio signal from ANT sensor without pushing a button,
Will this function sd_app_evt_wait() help ?
I put at the end of the loop,
So far I need to push the button to wake up the chip,
Thanks
Typically to achieve communication between two ANT nodes, then one is a master and the other is a slave. A slave device can search for a master at any time based on a few parameters, if an appropriate master is found, then the slave device will synchronize with the master and "track" the master. If there is no master present, the slave will timeout search, and typically the slave will enter idle mode until the user press a button or similiar to initiate searching again. Reason for not searching continously is that it is a rather current consumption intensive mode, so you don't want to be searching continously. If you don't want a user to activiely push a button to start searching, then you will either need to for instance use a timer to periodically start searching and/or just start searching again on every search timeout.
It is common practize to put the MCU to sleep (even if radio is in use searching or not) by calling sd_app_evt_wait() to save power.
Kenneth
Hi Kenneth,
Thanks for the reply,
"..........If you don't want a user to activiely push a button to start searching, then you will either need to for instance use a timer to periodically start searching and/or just start searching again on every search timeout."
Which function can I use with timer for searching for master ?
Any example in SDK ?
Await for reply ..
Thanks
I suggest to add an app_timer() to call this.
Kenneth
app_timer(), call sd_event_wait() or call a function for searching the master ?
What's the function for searching master ?
Thanks
You should be able to find out how an app_timer can be created and started by looking at some of the example projects, the app_timer will allow you to run some code at a timeout or given interval.
In terms how to setup a slave device to search for a master, this is explained in this document:
https://www.thisisant.com/resources/an11-ant-channel-search-and-background-scanning-channel/
In short the slave will start searching for a master when the ANT open channel is called.
Kenneth
Thanks for the information, I will see and keep posted.
Thanks for the information, I will see and keep posted.