-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added readme for temperature broadcast project
- Loading branch information
1 parent
0f720b6
commit 266ba54
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
libraries/BLE/examples/ble_temperature_broadcast/README.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
= Broadcast example with Pipe | ||
|
||
This example demonstrates the use of a Broadcast Pipe for the Health Thermometer Service. The nRF8001's temperature sensor is used to read the temperature. | ||
The temperature is then Broadcast using the Service Data Advertising type. | ||
|
||
== About | ||
The example reads the temperature of the nRF8001 using the ACI command GetTemperature, the lib\_aci\_get\_temperature() function is used to get the temperature. The temperature is returned in the ACI Command Response Event for the ACI command. | ||
|
||
The temperature is broadcast using the lib_aci_set_local_data() function. This function places the ACI SetLocalData command in the ACI command queue. When the | ||
ACI SetLocalData command is executed, the value of the Broadcast Pipe is updated. | ||
|
||
The ACI Broadcast command is to send ADV_NON_CONN_IND advertisements with the Service Data Advertising type. This will broadcast the Temperature as advertisement packets. | ||
|
||
The temperature is read and the Broadcast Pipe is updated every 4 seconds. A Timer on the Arduino is used to measure 4 seconds. The timer functionality is provided with a Timer library. | ||
|
||
|
||
== ACI Commands used and ACI Events consumed | ||
|
||
[cols="1"] | ||
.ACI Commands used | ||
|=== | ||
|ACI Broadcast | ||
|ACI SetLocalData | ||
|ACI GetTemperature | ||
|ACI Setup | ||
|=== | ||
|
||
[cols="1"] | ||
.ACI Events consumed | ||
|=== | ||
|ACI Device Started Event | ||
|ACI Command Response Event | ||
|=== | ||
|
||
|
||
|
||
|