CY8CKIT-046 PSoC® 4 L-Series Pioneer Kit Guide, Doc. #: 002-03344 Rev. *D
36
Code Examples
4.4.2
Hardware Connections
Connect five-inch wires (the green wires provided with the kit) to proximity headers J21 and J22 on
the PSoC 4 L-Series Pioneer Kit, as shown in
Figure 4-15. Proximity Sensor (Gestures) Connection on PSoC 4 L-Series Pioneer Kit
4.4.3
Verify Output
To verify the proximity gestures code example, follow these steps:
1. Connect the PSoC 4 L-Series Pioneer Kit to the PC through USB connector J10.
2. Program the PSoC 4 L-Series Pioneer Kit with the
CY8CKIT_046_Proximity_Gestures
code
example.
3. Connect the proximity sensor wires as shown in
. You should bend the wires to form
a rectangle, as shown in
to get better proximity gesture detection. Press the reset
switch (SW1) when the wires are in place.
4. Bring your hand close to the proximity sensors. The RGB LED will turn ON in red.
5. The brightness of the LED will increase as you bring your hand closer to the proximity sensors.
6. Wave the hand at a close proximity from the bottom sensor to the top sensor (Wave UP gesture)
to see the LED color change in the order red > green > blue > red, one color at a time with each
wave.
7. Wave the hand at a close proximity from the top sensor to the bottom sensor (Wave DOWN ges-
ture) to see the LED color change in the order red > blue > green > red, one color at a time with
each wave.
The power consumed by the PSoC 4200L device for this example can be measured using an amme-
ter as described in the
.
4.5
CapSense Buttons
4.5.1
Project Description
This code example demonstrates basic dual-channel CapSense functionality in the PSoC 4 L-Series
Pioneer Kit. The example implements five CapSense buttons using the CSD0 block and a proximity
sensor using the CSD1 block. The buttons are used to control the brightness and color of the
onboard RGB LED. The signal from the proximity sensor provides an additional brightness control
factor. The LED brightness level is controlled by the buttons and the proximity signal provides a mul-
tiplication factor to the brightness output from the buttons.