CY8CKIT-003 PSoC 3 FirstTouch Starter Kit Guide, Spec. # 001-49613 Rev. *B
19
Example Projects
4.2
Bubble Level Emulator
This project emulates a glass bubble level instrument using the onboard accelerometer and the LED
display. When the program is run, the LEDs shows the direction in which the board is tilted.
Running the Bubble Level Emulator project:
1. Connect the PSoC 3 FirstTouch Starter Kit board to the USB port of the PC using the USB cable.
2. Click on the example project BubbleLevel from
Kits and Solutions
present on the Startup page
of the PSoC Creator.
3. Make a folder in the desired location and click
OK
.
4. Project opens up in the PSoC Creator and gets saved in that folder.
5. Follow step 1 to 4 in section
4.1.3 Build, Program, and Run the PSoC Rocks Project on page 14
to program the project into the PSoC 3 FirstTouch Starter Kit board.
6. When the download is complete, remove the PSoC 3 FirstTouch Starter Kit board from the USB
port and connect a 9V DC battery to the battery connector of the PSoC 3 FirstTouch Starter Kit
board.
7. Tilt the board along the X axis of the accelerometer by holding the battery in a stationary position
and move the edge opposite the battery up and down as shown in
Figure 4-9
. As you tilt the
board, you could see the direction of the tilt on the LED display.
Figure 4-9. Bubble Level Emulator - Perpendicular Motion
electronic components distributor