Appendix
CY8CKIT-044 PSoC® 4 M-Series Pioneer Kit Guide, Doc. No. 001-96598 Rev. *C
34
Figure 4-14 Accelerometer Movement in Z-axis
Table 4-3. LED Color Corresponding to Direction of Motion
Direction of Motion
RGB LED Color
x-axis
Red
y-axis
Green
z-axis
Blue
Note:
If the kit is moved in multiple axes, the PSoC 4200M modulates the intensity of RGB LED color corresponding to
each axis depending on the acceleration detected on that axis. For example, if kit is moved in both x- and y- axis, the RGB
LED shows a combination of red and green colors.
4.7.2 Hardware Connections
No specific hardware connections are required for this project. All connections are hardwired on the board.
4.7.3 Verify Output
1. Power the PSoC 4 M-Series Pioneer Kit through USB connector J6.
2. Program the PSoC 4 M-Series Pioneer Kit with
CY8CKIT_044_Accelerometer
project.
3. Move the PSoC 4 M-Series Pioneer Kit in different directions to see the RGB LED glow as described in
Table 4-3
.
4.8 Sensor Hub
4.8.1 Project Description
This example project demonstrates the capability of the PSoC 4200M device to function as a sensor hub device. The
PSoC 4200M can interface with multiple digital and analog sensors. In this example project, the PSoC 4200M interfaces an
I2C-based accelerometer, a PWM-based temperature sensor, and an ambient light sensor. This example project requires
the associated µC/Probe project files to show the output.
The firmware measures the ambient temperature, ambient light, and the accelerometer values from the sensors
and stores them in global variables.
The firmware also implements Real-Time Clock (RTC) functionality and stores this
information in global variables.
µC/Probe reads these global variables and displays the results in a graphical
format as shown in
Figure 4-18
. This allows real time monitoring of data in the system.
The firmware changes the brightness of the onboard RGB LED according to the changes made in the RGB Palette in the
µC/Probe tool. The firmware also logs the temperature and acceleration data along with the RTC timestamp information
onto the onboard F-RAM device every one second. Data is stored in the format [timestamp hours, timestamp minutes,
timestamp seconds, temperature data integer part, temperature data fractional part, x-axis acceleration MSB, x-axis
acceleration LSB, y-axis acceleration MSB, y-axis acceleration LSB, z-axis acceleration MSB, z-axis acceleration LSB]. If
the F-RAM is full, the firmware rewrites the data from the beginning of the F-RAM.
The firmware also reads back the data logged to the F-RAM every one second and sends it through a UART. This data can
be read using the KitProg USB-UART bridge. Refer to the
KitProg User Guide
to learn how to use the KitProg USB-UART
bridge.
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