CY8CKIT-046 PSoC® 4 L-Series Pioneer Kit Guide, Doc. #: 002-03344 Rev. *D
35
Code Examples
based on the recognized gesture. The RGB LED turns OFF if proximity is not detected for more than
3 seconds. The CapSense scanning interval is changed to 200 ms when proximity is not detected.
This example supports the CapSense tuner. For more details see
.
Note
: The gesture is registered only when the hand moves completely from one sensor to the other
through both the proximity sensors as shown in
and
.
Note:
The time of 30 ms and 200 ms are dependent on the LFCLK accuracy. This example uses the
32.768-kHz WCO in the kit as the LFCLK source. This offers a 250 ppm accuracy on the time. If the
WCO is not used or available, the ILO can be used to source LFCLK. In the case of the ILO, the
accuracy of the time can vary as much as 60 percent. Use the ILO trim method provided in the
example
to improve the ILO accuracy to 10 percent.
Figure 4-13. Proximity Gesture Recognition with PSoC 4 L-Series Pioneer Kit (Wave UP)
Figure 4-14. Proximity Gesture Recognition with PSoC 4 L-Series Pioneer Kit (Wave DOWN)
Table 4-1. Proximity Gestures and Actions
Gesture
Action (LED color change)
a
a. Each Wave UP/DOWN gesture will trigger an LED color transition.
Wave UP
Red > Green > Blue > Red
Wave DOWN
Red > Blue > Green > Red