[null, {"document_url": "https://www.sparkfun.com/products/13162", "unformatted_src": "https://cdn.sparkfun.com//assets/parts/1/0/2/7/9/13162-01a.jpg", "src": "https://cdn.sparkfun.com//assets/parts/1/0/2/7/9/13162-01a.jpg", "alt_text": "ZX Distance and Gesture Sensor"}, {"document_url": "https://www.sparkfun.com/products/13162", "unformatted_src": "https://cdn.sparkfun.com//assets/parts/1/0/2/7/9/13162-02.jpg", "src": "https://cdn.sparkfun.com//assets/parts/1/0/2/7/9/13162-02.jpg", "alt_text": "ZX Distance and Gesture Sensor"}, {"document_url": "https://www.sparkfun.com/products/13162", "unformatted_src": "https://cdn.sparkfun.com//assets/parts/1/0/2/7/9/13162-04.jpg", "src": "https://cdn.sparkfun.com//assets/parts/1/0/2/7/9/13162-04.jpg", "alt_text": "ZX Distance and Gesture Sensor"}, {"document_url": "https://www.sparkfun.com/products/13162", "unformatted_src": "https://cdn.sparkfun.com//assets/parts/1/0/2/7/9/13162-03.jpg", "src": "https://cdn.sparkfun.com//assets/parts/1/0/2/7/9/13162-03.jpg", "alt_text": "ZX Distance and Gesture Sensor"}, null]

ZX Distance and Gesture Sensor

19 available SEN-13162 Open Source Hardware 3 Creative Commons images are CC BY 2.0

Use this URL to share:

Previous Versions


19 available SEN-13162 Open Source Hardware
19 available 19 items in stock.

The ZX Distance and Gesture Sensor is a touchless sensor that is capable of looking for simple gestures. Developed in conjunction with XYZ Interactive, the sensor uses their GestureSense® technology to recognize the distance of an object away from the sensor up to about 12 inches (30cm, referred to as the “Z” axis) and the location of the object from side to side across the sensor in about a 6-inch (15cm) span, referred to as the “X” axis. You will be able to use I2C or UART to communicate with the ZX Sensor via a microcontroller or computer.

The ZX Sensor works by bouncing infrared (IR) beams of light from the two LEDs on either side off of an object above the sensor. The bounced light returns to the receiver in the center of the sensor, and a microcontroller on the back of the sensor interprets the data. With these IR pieces you will easily be able to ascertain both the Z axis and the X axis of an object (hence the name). In addition to providing Z and X axis data about an object, the ZX Sensor is capable of detecting simple gestures. We have also clearly labeled all the pin outs on the board, as well as signifying if they are needed in I2C or UART communication.

Get started with the ZX Sensor Guide


ZX Distance and Gesture Sensor Product Help and Resources

ZX Distance and Gesture Sensor SMD Hookup Guide

June 1, 2017

How to connect and use the SparkFun ZX Distance and Gesture Sensor with an Arduino.
Favorited Favorite 4

Product Showcase: ZX Distance and Gesture Sensor

Published on June 1, 2017

Video title

I2C addresses

last updated about 2 years ago

Even though the back of the board is marked Open = 0x20 and Closed = 0x22, Arduino will see open as 0x10 and closed as 0x11.

I2C Communications Error


If you see this error output using the I2C_ZX_Demo.ino code:

Make sure that you are connected to the I2C pins correctly. If you have any loose connections, you will have issues communicating with the sensor through I2C. If you are using an Arduino Mega, make sure that you are connecting to the correct I2C pins https://www.arduino.cc/en/Reference/Wire .

Core Skill: Soldering

1 Soldering

Core Skill: Programming

3 Programming

Core Skill: Electrical Prototyping

2 Electrical Prototyping

Customer Comments


4.3 out of 5

Based on 3 ratings:

Currently viewing all customer reviews.
Showing results with star rating.

1 of 1 found this helpful:

Even better!!

about a year ago by Member #1106602 verified purchaser

Been playing with the new ZX sensor and I have to say it has been great so far. I worked with the older model in the past, which had the through-holes (https://youtu.be/lvr1SKRGgqc). In comparison these work just as well with the added benefit of being thinner and flatter. I was able to redesign some of my older gesture control modules to be smaller because of this, as well as make the sensors more discrete by placing it behind some polycarbonate, which keeps out visible light and lets infrared emissions through. Thanks Sparkfun and XYZ for this updated product. Looking forward to more hours of building fun.


Works well when it works.

about a year ago by Member #1211433 verified purchaser


Coolest sensor I ever owned !!!!!

last year by Member #701882 verified purchaser

I tested this sensor behind plastic on a sliding cupboard door, with an Arduino controlled motor moving the door. Door opens with this sensor “seeing” a directional swipe from my hand. Door closes automatically after a minute. Love this sensor and the ideas to make other stuff. Looking for an IoT sensor next.


No account? Register one!