All of the initial setup steps to scan for devices, connect to a device, discover services and characteristics lead up to being able to have access to a Bluetooth LE device’s data. Core Bluetooth facilitates this as well by exposing calls on the peripheral class representation of the device to read a value for a given characteristic.
- [Instructor] So now that we've successfully written data…to our characteristic on the peripheral,…we want to look at reading data from a characteristic.…When you read the data, you get it back as a data instance.…And in many cases, that data is going to need to be massaged…or processed some how to become meaningful data…that you can use in your app.…To read the data, you call the function read value…on the peripheral and pass in the characteristic…that you want to read the value for.…There's a call back called did update value…for characteristic that we'll implement…to get the value and process it however we need.…
We want to do this regularly so that we get updates…of our characteristic's value ongoing,…and we'll create a timer for that in our code.…So one thing that we want to look at is what kind of data…do we get back from our characteristic.…If we go back to the user's guide online,…we can scroll down to the optical sensor,…and we can see that the data that we get back needs to be…processed in this way to be able to…
- 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.