# Light CTL example
@tag52840and52833and52832
@tag52810and52820nosupport
This example demonstrates how you can use Bluetooth mesh messages and events
from the [Light CTL models](@ref LIGHT_CTL_MODELS) API to implement a tunable white light.
The example is composed of three minor examples that use the Light CTL Client and Light CTL Server models:
- Light CTL client model example
- Light CTL server model example
- Light CTL server with Light LC server models' example
For more information about the Light CTL Client and Server models, see the @link_ModelOverview from Bluetooth SIG.
For provisioning purposes, the example requires either [the provisioner example](@ref md_examples_provisioner_README)
or the @link_nrf_mesh_app.
All the minor examples have the provisionee role in the network.
They support provisioning over Advertising bearer (PB-ADV) and GATT bearer (PB-GATT)
and also support Bluetooth mesh Proxy Service (Server).
Read more about the Proxy feature in @ref md_doc_user_guide_modules_provisioning_gatt_proxy.
**Table of contents**
- [Light CTL client model example](@ref light_ctl_example_light_ctl_client)
- [Light CTL server model example](@ref light_ctl_example_light_ctl_server)
- [Scene model](@ref light_ctl_example_light_ctl_server_scene_model)
- [Light CTL Server and Light LC Server models' example](@ref light_ctl_example_light_ctl_lc_server)
- [Light CTL models](@ref light_ctl_example_light_ctl_model)
- [Hardware requirements](@ref light_ctl_example_hw_requirements)
- [Software requirements](@ref light_ctl_example_sw_requirements)
- [Setup](@ref light_ctl_example_setup)
- [LED and button assignments](@ref light_ctl_example_setup_leds_buttons)
- [Scene model integration](@ref light_ctl_example_setup_scene_model)
- [Testing the example](@ref light_ctl_example_testing)
- [Evaluating using the static provisioner](@ref light_ctl_example_testing_dk)
- [Evaluating using the nRF Mesh mobile app](@ref light_ctl_example_testing_app)
- [Interacting with the boards](@ref light_ctl_example_testing_interacting)
- [Controlling CTL lightness, CTL temperature, and CTL delta UV values](@ref light_ctl_example_controlling_lightness_value)
- [Changing behavior on power-up](@ref light_ctl_example_changing_behavior_on_powerup)
- [Restricting the range of the CTL temperature value](@ref light_ctl_example_changing_temperature_range)
- [Restricting the range of the CTL lightness value](@ref light_ctl_example_changing_lightness_range)
- [Other factory default configuration](@ref light_ctl_example_other_factory_default_configuration)
---
## Light CTL client model example @anchor light_ctl_example_light_ctl_client
The light CTL client model example has a provisionee role in the network.
It implements two instances of the [Light CTL Client model](@ref LIGHT_CTL_CLIENT).
These instances are used to control the brightness of the LEDs on the servers,
the range of supported CTL temperature levels, and the CTL lightness, temperature, and delta UV
values after the servers' boot-up.
---
## Light CTL server model example @anchor light_ctl_example_light_ctl_server
The light CTL server model example has a provisionee role in the network.
It implements one instance of the [Light CTL Setup Server model](@ref LIGHT_CTL_SETUP_SERVER),
and [Light Lightness Setup Server model] (@ref LIGHT_LIGHTNESS_SETUP_SERVER). These instances
in-turn initialize other necessary models.
The Light Lightness Server model is used by Light CTL Server to control the lightness value.
The Light CTL Server model is used to receive the lightness, temperature and delta UV values.
The received values are used to demonstrate a tunable white light by means of the
two LEDs on the DK board. The LED 1 represents a warm light, while LED 2
represents a cool white light. These two LEDs are controlled with different PWM duty cycles
corresponding to the given color temperature. Also, the overall light output is
scaled by the given lightness level to achieve dimming. The photometrically accurate
implementation of the tunable white light is out of scope of this example.
The model instance uses the @link_APP_PWM library from the nRF5 SDK to control
the brightness of the LEDs. To demonstrate a tunable white light, the lightness and
the temperature values are converted to appropriate brightness level for each LED. These
are then converted to the generic level values to map them to the PWM tick values for each LED.
![Light CTL example structure](ctl_example_structure.svg)
### Scene model @anchor light_ctl_example_light_ctl_server_scene_model
The light CTL server model example also implements one instance of the [Scene Setup Server model](@ref SCENE_SETUP_SERVER).
The Scene Setup Server instance can be used together with the [Scene Client](@ref SCENE_CLIENT),
although both model instances are optional and [can be excluded](@ref light_ctl_example_setup_scene_model).
The Scene Server model uses the Default Transition Time Server instance instantiated
in the Light CTL Setup Server model instance.
For the values stored and recalled by the Scene model, see the @tagMeshMdlSp, Table 6.123.
For more information on how to use the [Scene models](@ref SCENE_MODELS),
see the [scene example](@ref md_examples_scene_README).
---
## Light CTL server and light LC server models' example @anchor light_ctl_example_light_ctl_lc_server
The light CTL server and light LC server models' example has a provisionee role in the network.
It implements one instance of the [Light CTL Setup Server model](@ref LIGHT_CTL_SETUP_SERVER),
a [Light LC Setup Server model](@ref LIGHT_LC_SETUP_SERVER), and other necessary models in such
a way that light LC server is able to control the lightness output. This shows how a tunable white
light can be implemented to have a feature of automated lighting control.
The Light CTL Server model instance is used to receive the CTL lightness, temperature, and
delta UV values and change the brightness and color temperature of the lights. The LC model
adds the capability for automated lightness control handled by the LC FSM and
PI regulator, based on predefined settings and sensor inputs. Refer to
[light LC server model example](@ref light_lc_server_example_testing_interacting) for information about
how a light LC server works.
The hardware interface of this example is similar to the light CTL server model example.
---
## Light CTL models @anchor light_ctl_example_light_ctl_model
The Light CTL Client model is used for manipulating the following states
associated with the peer Light CTL Server, Light CTL Setup Server, and Light CTL Temperature
Server models:
- Light CTL Lightness
- Light CTL Temperature
- Light CTL Delta UV
- Light CTL Lightness, Temperature, and Delta UV Default
- Light CTL Temperature Range
@note The Light CTL Lightness is bound with Light Lightness Actual state. The received Light
Lightness state value is represented in the form of Light CTL Lightness value as a result of
this binding.
More information about the Light CTL models can be found in the
[Light CTL models documentation](@ref LIGHT_CTL_MODELS).
---
## Hardware requirements @anchor light_ctl_example_hw_requirements
You need at least two compatible development kits for this example:
- One compatible development kit for the client.
- One or more compatible development kits for the servers.
On the server boards, you can either run the light CTL server model example or
the light CTL server with light LC server models' example, or both of them.
If you choose the light CTL server with light LC server models' example, you also need at least one of the
following:
- One compatible development kit for emulating the occupancy sensor.
- One compatible development kit for the [light switch client](@ref light_switch_demo_client).
See [light LC server model example testing](@ref light_lc_server_example_testing) section
for more information about how the light
没有合适的资源?快使用搜索试试~ 我知道了~
nRF5 SDK for Mesh V5.00src
共2000个文件
h:453个
ld:359个
sct:358个
需积分: 5 0 下载量 64 浏览量
2024-01-22
17:12:33
上传
评论
收藏 102.51MB ZIP 举报
温馨提示
nRF5 SDK for Mesh V5.00src
资源推荐
资源详情
资源评论
收起资源包目录
nRF5 SDK for Mesh V5.00src (2000个子文件)
mcp_findMeMasterServer.bin 2KB
ut_device_state_manager.c 202KB
config_server.c 127KB
ut_config_server.c 117KB
ut_access.c 106KB
device_state_manager.c 104KB
transport.c 84KB
ut_flash_manager.c 70KB
access.c 64KB
uECC.c 63KB
ut_prov_bearer_adv.c 61KB
app_light_ctl.c 59KB
pb_remote_server.c 58KB
friend.c 58KB
ut_prov_provisioning.c 57KB
ut_config_client.c 57KB
dfu_mesh.c 56KB
ut_mesh_config.c 56KB
ut_net_state.c 55KB
uECC.c 54KB
light_lightness_setup_server.c 54KB
ut_serial_handler_mesh.c 53KB
SEGGER_RTT.c 52KB
app_light_lightness.c 51KB
prov_bearer_adv.c 51KB
ut_heartbeat.c 50KB
light_ctl_setup_server.c 49KB
config_client.c 46KB
light_lc_fsm.c 45KB
pb_remote_client.c 45KB
ut_scene_server.c 43KB
light_lc_mc.c 43KB
ut_generic_level_server.c 43KB
flash_manager.c 42KB
ut_transport_replay.c 39KB
proxy.c 39KB
app_sensor_utils.c 39KB
ut_scanner.c 38KB
ut_friend.c 38KB
ut_radio.c 38KB
ut_proxy.c 37KB
ut_timeslot.c 37KB
nrf_mesh_dfu.c 37KB
lpn.c 37KB
app_timer_mesh.c 36KB
main.c 36KB
ut_filters.c 36KB
ut_serial_handler_access.c 36KB
ut_flash_manager_defrag.c 35KB
ut_mesh_flash.c 35KB
serial_handler_mesh.c 34KB
ut_access_reliable.c 34KB
ut_friend_queue.c 34KB
ut_network.c 33KB
light_lc_setup_server.c 33KB
ut_net_beacon.c 32KB
main.c 32KB
node_setup.c 31KB
mesh_gatt.c 31KB
main.c 30KB
ut_transport.c 30KB
ut_transport_lpn.c 29KB
ut_advertiser.c 29KB
ut_scene_client.c 28KB
net_state.c 28KB
ut_network_vectors.c 28KB
ut_generic_level_client.c 28KB
ut_packet_buffer.c 27KB
ut_timer_scheduler.c 27KB
ut_health_server.c 27KB
prov_provisionee.c 27KB
ut_bearer_handler.c 27KB
main.c 26KB
sensor_setup_server.c 26KB
main.c 25KB
timeslot.c 25KB
ut_mesh_gatt.c 25KB
flash_manager_defrag.c 25KB
main.c 25KB
ut_generic_onoff_server.c 25KB
light_lightness_client.c 24KB
main.c 24KB
mesh_aci.c 24KB
bootloader.c 24KB
light_ctl_client.c 24KB
app_level.c 24KB
ut_prov_utils.c 24KB
main.c 24KB
sensor_client.c 24KB
ut_access_publish_retransmission.c 24KB
prov_provisioner.c 23KB
bootloader_info.c 23KB
ut_net_packet.c 23KB
light_lightness_mc.c 23KB
serial_handler_prov.c 22KB
light_lc_client.c 22KB
ut_health_client.c 22KB
ut_serial_handler_dfu.c 22KB
health_server.c 22KB
main.c 21KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
hnhxk2983
- 粉丝: 0
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功