Reading a value from a Bluetooth LE device’s characteristic is useful. But what might be more efficient is being notified when the value changes. This may save a lot of performance on the app side as well as have a smaller drain on the battery life. Only being notified by the device when the value has changed is accomplished via Core Bluetooth.
- [Instructor] So now we've seen…how to read data from the device manually.…We used a timer to do it every five seconds,…however if the data doesn't change for a long time,…this can be unnecessary and inefficient,…especially for battery life of both devices.…Imagine that the device is in a dark room…and the light doesn't change for a long time,…then someone walks in, and suddenly the light changes,…that's when we care about the new value.…If we can have a situation where the peripheral…updates the manager with the new value…only when it changes, that would be ideal.…
And that's possible for some characteristics.…You can set the notify value to be true,…and only when the value change will the central be updated.…However, it always does depend…on the specific implementation of the device you're using.…In our case for the sensor tag,…the light sensor updates still come in at a timed interval.…But if we look at the documentation,…we can see that there are other characteristics…that have the notification permission.…
- Bluetooth Low Energy (BLE) basics
- Core Bluetooth key classes
- Scanning for peripherals
- Discovering services and characteristics
- Writing to a characteristic
- Reconnecting to peripherals
- Apps as peripherals
Skill Level Intermediate
1. BLE Basics
2. Scanning, Connecting, and Discovering
3. Writing to a Characteristic
Adding additional features10m 43s
4. An App as a Peripheral
Next steps1m 7s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.