- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am trying to send the battery level in the advertisement packet. I am using the CY8CKIT-042-BLE. I used the constant broadcaster sample application provided by Cypress and tried to modify it. I used the Timer to decrement the value of the battery as showed in the video lectures. I am able to put custom data in the advertisement packet, but not real time data. Can any one help me?
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In real time means on actual advertisement, right?
If that is the case, try using the API 'CyBle_GapUpdateAdvData' after every data change.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Consider posting your project, makes life easier to troubleshoot.
“File” Designer
“Archive Project”
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In real time means on actual advertisement, right?
If that is the case, try using the API 'CyBle_GapUpdateAdvData' after every data change.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shalin,
How are you measuring battery voltage? It would be good to have this type of functionality baked into a drop in component. At the moment it's not clear how to achieve this without adding external components.
A simple once per day BAT check to indicate if the coin cell is OK or LOW will do. If LOW I can mod the advertising packet so an observing smartphone can take action. In my particular application measurements don't need to be high accuracy or frequency but they do need to be low power and I'd prefer not to add any external components.
Riot is correct, updating the advertisement is fairly straight forward using CyBle_GapUpdateAdvData. You can actually do a whole host of things with this. Have a look at the 100 Days Project 9 Dynamic Broadcasting.
Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you all for the comments,
@Paul: I am using the onboard ADC and the battery measuring sample code provided in Project 045 the Optical Heart rate Monitor.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shalin,
I am using the same code but it always gives 100%. I did not suspect anything until the battery suddenly died. It seems that there should be some time between 100% and when the battery died (which the code cannot measure). Now I am questioning its accuracy. Have you done any test to determine how accurate it is?
Alex