Author Topic: RFduino.send on demand, not streaming  (Read 439 times)


  • RFduino Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
RFduino.send on demand, not streaming
« on: May 02, 2017, 08:52:09 PM »
I am building a low power device based on RFduino. There is an app to monitor the device, which every hour (and by demand of users when click a button) asks for some data from RFduino.

I don't want to put RFduino.send function in the for loop, since it will continuously streaming data when RFduino is connected to the app, and that will waste battery.

On the other hand, I could put RFduino.send whenever the device connects to the smartphone. However this way to get new data, the app would have to disconnect and connect again.

Code: [Select]
void RFduinoBLE_onConnect() {

What is the best way to implement on demand data sending in RFduino?


  • Global Moderator
  • *****
  • Posts: 880
  • Karma: +21/-0
    • View Profile
    • Thomas Olson Consulting
Re: RFduino.send on demand, not streaming
« Reply #1 on: May 03, 2017, 08:31:37 AM »
You can put the send in the main loop within a conditional statement that only sends when the condition has been met.