User Manual Part 1

CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *A 81
Example Projects
Figure 4-63. User Button on BLE Pioneer Kit with PSoC 4 BLE Module
Note: To revert the CySmart functionality to the dongle, program the dongle hex file, as described in
Updating BLE Dongle for CySmart PC Tool on page 33.
4.5 BLE Dongle and LED Control
4.5.1 Project Description
This firmware supports the CySmart debug tool (see CySmart PC Tool on page 160) by acting as the
BLE host emulator. This is the default firmware that comes in the BLE dongle shipped with the kit.
This project additionally demonstrates LED brightness control via a custom BLE profile, which works
with the CapSense slider example explained in CapSense Slider and LED on page 47.
The device will scan for the peripheral acting as a CapSense slider and LED device, and connect to
it automatically. This is achieved by filtering the advertisement packets for the CapSense Slider
service data, which will be sent by the CapSense slider example. Then, it will enable slider
notifications and process the received notifications. Whenever CapSense detects activity, it will
notify the finger location to the dongle; the dongle will update the LED brightness using PWM.
The custom client LED control will be stopped if the CySmart PC tool acquires the dongle. The
dongle will enter the CySmart emulator mode, in which it will process all BLE commands as
triggered by the user via the tool. The project uses custom command/event protocol to exchange
data between the CySmart PC tool and the BLE component via a USB-CDC interface. It uses the
Cypress USB-UART bridge functionality from the PSoC 5LP-based KitProg module described in
Using PSoC 5LP as USB-UART Bridge on page 115.
Note: This project is meant only for the PRoC BLE device and works on the dongle hardware.