This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to poll data from sensor using an android app nrf52 nordic

I am developing on the nRF52 boards with a capacitive sensor. I followed the tutorial in this link and created a custom service with 3 read characteristics. I am able to use the nordic connect app to read the values in those 3 characteristics continuously. I am also able to modify the nrf uart app to read those values and print it out on the phone continuously when I connect to the nrf52.

However, what I want to do now is polling data from the nrf52 when I press a button on the android app. For example, my nrf52 will be in sleep mode, then when I connect it to the phone and pressed a button, then the nrf52 will wake up and send some data over to the phone for a few seconds then nrf52 goes back to sleep again.

I'm having trouble on how to set up my application so that it will only send data when I press a button. Any suggestion on how to implement this would be appreciated it.

Thank you

Parents
  • Thanks a lot for your answer, I'm still trying to figure out how I am going to implement everything. So is there a way to send a signal from the phone to the nrf52 board to wake up the board?

    Also, On the nrf connect app, there is a download button on the side of the read characteristic and each time I hit the download button, it will update a new value from the capcitive sensor reading. Basically, I want to implement a button like that.

    On top of that button, I want the nrf52 board to read data from the capacitive sensor for a few seconds when I press the button. when the button is not pressed then the nrf52 board and the capacitive sensor should be in sleep mode.

    Does this clarify more on my questions?

Reply
  • Thanks a lot for your answer, I'm still trying to figure out how I am going to implement everything. So is there a way to send a signal from the phone to the nrf52 board to wake up the board?

    Also, On the nrf connect app, there is a download button on the side of the read characteristic and each time I hit the download button, it will update a new value from the capcitive sensor reading. Basically, I want to implement a button like that.

    On top of that button, I want the nrf52 board to read data from the capacitive sensor for a few seconds when I press the button. when the button is not pressed then the nrf52 board and the capacitive sensor should be in sleep mode.

    Does this clarify more on my questions?

Children
No Data
Related