CY8CKIT-046 PSoC® 4 L-Series Pioneer Kit Guide, Doc. #: 002-03344 Rev. *D
37
Code Examples
Pad pattern in the kit. The sensors marked 1 to 5 are used to implement the CapSense buttons. The
functionality of each button is listed in
.
This example implements dual-channel CapSense, enabling the CapSense buttons and CapSense
proximity sensor to be scanned at the same time. This helps reduce the time the device spends in
scanning all the sensors using a single-channel CapSense. As a result, the CapSense response
time will be faster. In addition, when the device is put into the DeepSleep power mode between
scans, the average power consumption of the system comes down. For details on dual-channel
capacitive scanning in the PSoC 4 L-Series family, refer to
AN85951 - PSoC 4 and PSoC 6 MCU
This example supports the CapSense tuner. For more details, see
.
Figure 4-16. CapSense Gesture Pad Pattern on the PSoC 4 L-Series Pioneer Kit
4.5.2
Hardware Connections
Connect a five-inch wire (the green wire provided with the kit) to proximity header J21 on the PSoC 4
L-Series Pioneer Kit, as shown in
4.5.3
Verify Output
To verify the CapSense Proximity code example, follow these steps:
1. Power the PSoC 4 L-Series Pioneer Kit through USB connector J10.
Table 4-2. CapSense Button Functions
Button/Sensor
Function
Center button (Sensor 1)
Turn ON/OFF the RGB LED
Left button (Sensor 2)
Cycles through red > green > blue > red colors on each tap
Right button (Sensor 4)
Cycles through red > blue > green > red colors on each tap
Up button (Sensor 3)
Increases the brightness of the LED by one step on each tap until maximum
brightness level is reached
Down button (Sensor 5)
Decreases the brightness of the LED by one step on each tap until minimum
brightness level is reached
Proximity sensor
Controls the brightness multiplication factor