July 10, 2015

To show off the ZX distance and gesture sensor, I recreated the classic game Pong using a 32×32 LED array and a Teensy. Users control the paddles by hovering their hands over the ZX sensors. The first to 5 points wins! This is a great, portable demo that gets love by old-school gamers at events.

Go to the GitHub Repository

3 Responses

  1. I have been checking the libraries for the ZX distance and gesture sensor and I see that there are only 3 gestures implemented: SWIPE RIGHT, SWIPE LEFT and SWIPE UP. In the demonstration video, when you are demonstrating the different gestures I can see on the screen that there are 2 additional gestures, which seem to be hover and move left and right. Why aren’t they in the libraries?

    I also see that the speed of the movement can be measured but I wonder what application can we give to that information. Can we use it to create different kinds of gestures, like fast swipe left and slow swipe left? I wonder how that would work out.

    As a side comment, I am missing a TAP gesture, just a simple tap on top of the center of the sensor. I see that when you are analyzing the Z position the sensor kind of hooks up in the center of X, so I question if such a thing would be possible.

    Thanks in advance for you answers.

    1. Swipe right, left, and up are implemented in the firmware and can be read over UART or I2C. These were programmed by XYZ Interactive. All that I’m doing in the library is just reading the values passed over those interfaces.

      In the video, there is a Windows program that I show (also written by XYZ Interactive) that can determine other gestures based on the Z and X positions.

      You could totally do something with the speed information. I have not figured out a good application for it, but I would love to see what you come up with. A slow vs. fast swipe could mean two different things.

      You would need to write the tap gesture in your own program – you could just look for a decreasing Z reading followed by an immediate increase.

      Hope that helps!

Leave a Reply