# How to use the accelerometer and tap detect for perimeter security

**URL:** <https://community.zymbit.com/t/how-to-use-the-accelerometer-and-tap-detect-for-perimeter-security/1647>\
**Category:** Perimeter Detect\
**Tags:** bookworm\
**Created:** [March 16, 2024, 8:29pm UTC](https://community.zymbit.com/t/how-to-use-the-accelerometer-and-tap-detect-for-perimeter-security/1647 "2024-03-16T20:29:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![beh](https://avatars.discourse-cdn.com/v4/letter/b/58f4c7/32.png) [@beh](https://community.zymbit.com/u/beh)\
**Post date:** [March 16, 2024, 8:29pm UTC](https://community.zymbit.com/t/how-to-use-the-accelerometer-and-tap-detect-for-perimeter-security/1647/1 "2024-03-16T20:29:01Z")

</div>

Hi,

Apologies for a newbie question. I have installed and configured my first Zymkey 4i on a Raspberry Pi 5 running Debian Bookworm (Raspberry Pi OS). The Zymkey is up and connected and I have installed the python and C libraries and I am getting accelerometer data. When I change the orientation of the pi or move it fast, the (x,y,z) numbers change. Questions:

1. What does “tap” means"? Tapping what? Tap the zymkey, tap the pi, or does it mean something all different? I am asking this because I have tried different things, and I cannot make the tap value to change to anything but “0”.

2. I’d like to be able to detect and alert on anyone moving the raspberry pi even slightly. How would I do this with the combination of zkWaitForTap, zkSetTapSensitivity, zkGetAccelerometerData and/or any of the other _perimeter_ functions?

Thank you.

---

<div class="post-metadata">

**Author:** ![Bob\_of\_Zymbit](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@Bob\_of\_Zymbit](https://community.zymbit.com/u/Bob_of_Zymbit)\
**Post date:** [March 18, 2024, 2:48pm UTC](https://community.zymbit.com/t/how-to-use-the-accelerometer-and-tap-detect-for-perimeter-security/1647/2 "2024-03-18T14:48:03Z")

</div>

@beh tapping means physically tapping the Zymkey or Pi. You can use the APIs to increase the sensitivity to see a tap event. Try setting to 100, then back it down to something that works for you.

---

<div class="post-metadata">

**Author:** ![beh](https://avatars.discourse-cdn.com/v4/letter/b/58f4c7/32.png) [@beh](https://community.zymbit.com/u/beh)\
**Post date:** [March 18, 2024, 10:59pm UTC](https://community.zymbit.com/t/how-to-use-the-accelerometer-and-tap-detect-for-perimeter-security/1647/3 "2024-03-18T22:59:59Z")

</div>

Thank you. That worked.
