PSoC® 4100S Pioneer Kit Guide, Doc. # 002-14067 Rev. *C
34
Code Examples
4.2
Code Examples
Table 4-1
shows a list of code examples that can be used with this kit.
Table 4-1. Code Examples in PSoC Creator
#
Project
Title/Description
1
CE214022 LP CapSense
Buttons
This code example implements two CapSense buttons using
CY8CKIT-041-41XX. The left button is used to control the onboard
RGB LED color, and the right button is used to control the brightness
of the RGB LED. Using the low-power modes available in the
PSoC 4100S device, an average current of 5 µA per button is
achieved when the touch is not detected.
2
CE214023 Proximity
Sensing
This code example demonstrates CapSense based proximity
sensing using a PCB trace as a proximity sensor. A proximity-
sensing distance of 5 cm is achieved using a rectangular loop sensor
with a 9-cm diagonal. Proximity detection is indicated by controlling
the brightness of an LED. The LED has a minimum brightness when
the hand is at a distance of 5 cm; it gradually increases as the hand
approaches the sensor. Using the low-power modes available in the
PSoC 4100S device, an average current of 25 µA is achieved while
detecting the proximity of a hand at 5 cm.
3
CE214025 Trackpad With
Color Gamut
This code example implements a CapSense based trackpad as a
user interface. The trackpad has the CIE 1931 color gamut
imprinted; user inputs (touch coordinates) are converted to the
corresponding color coordinates. The RGB LED on the board is
used to illustrate the chosen color by modulating the associated
signal densities. The brightness of the RGB LED is controlled by
using the two CapSense buttons.
4
CE216873 ADC with
Breathing LED
This code example demonstrates the use of the Sequencing SAR
ADC Component to measure an input voltage on any I/O pin. The
example also shows how to implement a breathing LED using the
Smart IO Component. The breathing LED effect is implemented by
XORing two pulse-width modulation (PWM) signals which have
slightly different frequencies. There are four levels of breathing rates
and three different color LEDs. Depending on the ADC result, a
specific LED and breathing rate is chosen. The ADC result is sent
over I
2
C to a host PC running Cypress's Bridge Control Panel (BCP)
program.
5
CE216892 USB-HID
Trackpad
This code example implements a CapSense trackpad and two
button sensors using a PSoC 4100S device. The PSoC device is
interfaced to a Windows PC as a mouse using the USB HID
protocol. The trackpad controls the cursor on the PC and the two
button sensors act as right-click and left-click buttons. To optimize
device power consumption and provide optimum touch response,
this code example implements two power modes: Fast Scan Mode
and Slow Scan Mode.
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from