CY3270 PSoC® FirstTouch™ Kit Guide, Document No. 001-15945 Rev. *D
51
Code Examples
5.1.3.1
Verify Output
1. Connect the PC Bridge
to PC.
2. Connect the MultiFunction card to the PC bridge.
3. Move your finger across the CapSense slider to detect LED color change.
■
When the finger position is on slider position CSB1-CSB3, the LED emits the color blue.
■
When the finger position is on the slider position CSB4 or CSB5, the LED emits the color green.
■
When the finger position is on the slider position CSB6 or CSB7, the LED emits the color red.
4. For all other slider positions, the LED is OFF. This includes the absence of a finger on the slider.
shows the change in LED color with respect to position of the finger on the board.
Figure 5-36. LED Color Variation with Respect to Finger Position
5.2
MultiFunction Expansion Card Light Sensor
The purpose of this code example is to demonstrate a light sensor. In this code example, the light
sensor is used to control the brightness of the LED array
The code example contains following User Modules:
■
ADC8
: This module converts the analog input to the digital form.The ADC8 module is used to
obtain the digital values for the light intensity.
■
LED
: LED is used to display the output based on the data from ADC.
■
EzI2Cs
: The EzI2Cs module configures PSoC on the MultiFunction board as I2C slave. The
slave data is available for acquisition using a bridge board that is configured as I2C master.