Join Michael Lehman for an in-depth discussion in this video Scanning for services and characteristics, part of Programming the Internet of Things with iOS.
- All right, while we've got connection…to the peripheral, now let's go ahead…and look at the data we've got…and do something with it.…So here we are, and first of all,…let's just go ahead and log when we get failure.…Not going to happen probably unless the peripheral…runs out of juice between the time we click scan…and the time we get there, but always good…to let the user know what happened.…All right, now in this case, the did connect…to peripheral is very simple.…We just need to tell that peripheral…that we're its delegate.…And then we need to ask it to discover services.…
Again, since we don't need to discover specific…services, we can just say nil.…And then we're going to go ahead and implement…didDiscoverServices so we know what to do…when we've got them.…If there's an error, let's log it.…But 99.999% of the time there's not going to be any.…The peripheral object contains an array of services.…So let's go ahead and enumerate those,…for(CBservice in peripheral.services).…We'll log them, and then we'll ask it…
- Exploring the IoT universe
- Understanding sensors and effectors
- Connecting inputs and outputs
- Connecting to devices via Wi-Fi or Bluetooth
- Using Apple iBeacon
- Creating your own things with programmable hardware
- Using IFTTT to program things
- Exploring trends in IoT
Skill Level Intermediate
1. The Internet of Things (IoT)
2. Exploring Things
3. Connecting to Things
4. Using Apple iBeacon
5. Creating Things
6. Managing Your Things
7. The Future of IoT
Next steps3m 4s
- 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.