CY8CKIT-046 PSoC® 4 L-Series Pioneer Kit Guide, Doc. #: 002-03344 Rev. *D
38
Code Examples
2. Program the PSoC 4 L-Series Pioneer Kit with the
CY8CKIT_046_CapSense_Buttons
code
example.
3. Insert the proximity sensor wire to the proximity sensor header as shown in
. You should bend the wire to form a loop, as shown in the figure to get better proximity
range. Press the reset switch (SW1) when the wire is in place.
4. Tap the centre button to turn ON the RGB LED. By default, the LED should turn ON with Red
color. Test the functions for each button captured in
5. Bring your hand close to the proximity sensor, as shown in
. As you move
your hand closer to the proximity sensor, the brightness of the LED increases. The brightness
decreases when you move your hand away from the sensor.
4.6
USB Mouse
4.6.1
Project Description
This code example demonstrates a simple USB human interface device (HID) implementation
(mouse/keyboard) using the CapSense Gesture Pad present in the CY8CKIT-046 PSoC 4 L-Series
Pioneer Kit. In addition to emulating mouse/keyboard over USB, the example also controls the RGB
LED intensity.
shows the CapSense Gesture Pad pattern on the PSoC 4 L-Series Pio-
neer Kit.
lists various mouse and keyboard actions associated with the gestures. USB is a complex
protocol, and it can be difficult for beginners to get a USB-based application up and running quickly.
Refer to the following documents to get started with USB and HID device class and to understand
the concept presented in this example:
■
AN57294 - USB 101: An Introduction to Universal Serial Bus 2.0
to get started with USB 2.0
■
AN57473 - USB HID Basics with PSoC 3 and PSoC 5LP
to learn HID device basics
■
AN58726 - USB HID Intermediate with PSoC 3 and PSoC 5LP
to learn intermediate HID con-
cepts
■
Device Class Definition for HID v1.11
to learn about the HID class specification from USB-IF
■
to learn about HID Usage tables - these tables provide additional details
on the HID descriptor usage
This example supports the CapSense tuner. For more details see
.