Skip to content

Commit

Permalink
Added readme for temperature broadcast project
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddedwin committed Mar 4, 2015
1 parent 0f720b6 commit 266ba54
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions libraries/BLE/examples/ble_temperature_broadcast/README.adoc
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
|===




0 comments on commit 266ba54

Please sign in to comment.