Graphic LCD 160x128 Huge LCD 08799 SparkFun Electronics


The is a collaboration product with. The innovative people at XYZ Interactive have created a unique technology that allows for simple infrared (IR) beams to be used to detect an object s location in two dimensions. The ZX Sensor is a touchless sensor that is capable of looking for simple gestures in the air above the sensor (e. G. We can use I 7 C or UART to communicate with the ZX Sensor. In this tutorial, we will show you how to connect the sensor to an Arduino or Arduino-compatible board as well as a computer so you can start creating gestures to handle all our your daily tasks or add some interactive flair to your project. In addition to the sensor itself, you will need a few extra components to follow along with the Arduino examples: If you would like to try the ZX Sensor on a Windows-based PC, you will need an FTDI Breakout:

Breaking the Ice On tinder

ZX Distance and Gesture Sensor SMD Hookup Guide learn

There are a few concepts that you should be familiar with before getting started with the ZX Sensor. Consider reading some of these tutorials before continuing: 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. We can read the results using an I 7 C or UART connection. The ZX Sensor gives us two ports to connect to: I 7 C and UART. You can see both ports are broken out to the 5. 6 thru holes. See the table below for a list of each pin and its function. The ZX Sensor has a couple of jumpers on the back of the board that can be opened or closed with a soldering iron. The ZX Sensor, by default, comes with 9. 7 kΩ pull-up resistors on the SDA and SCL I 7 C lines.

Remove the solder on this jumper using solder wick to disconnect the pull-ups. By default, this jumper is open. Close it to change the I 7 C address of the sensor. To keep the board from tilting while soldering, place the unused break away headers sideways under the board. Heads up! Do not solder headers to the row of holes at the top of the board. Those are for programming the PIC micrcontroller. For the Arduino examples, we will be using I 7 C. Connect the breakout board to the following RedBoard pins: Note that we connect the DR pin, but we will only use it in the. DR stands for Data Ready, which is active high whenever data is ready to be read from the ZX Sensor. We can attach this to an Arduino interrupt so we don t have to continuously poll the sensor. All of the hard work for the ZX Sensor is being accomplished in the microcontroller on the sensor itself.

Arduino TFT Forecast Weather Station With ESP8266 5 Steps

All we need to do is read the results! We have created an Arduino library to make that even easier for you. Click the button to download the latest version of the ZX Sensor Arduino Library. You can also find the latest files in the. Follow to install the files as an Arduino library. Open up the Arduino program and select File → Examples → SparkFun_ZX_Distance_and_Gesture_Sensor → I7C_ZX_Demo. Attach a cable from your computer to the RedBoard. If you have not previously done so,. Make sure you have the correct serial port selected under Tools → Serial Port and Arduino Uno selected under Tools → Board. If you have never used the Arduino IDE before, should get you started. Click the Upload button and wait for the program to finish uploading to the Arduino. Select Tools → Serial Monitor to open up the serial terminal. More info on the Serial Terminal can be found.

You should see a couple of messages noting that ZX Sensor initialization complete. Move your hand around above the sensor, and you should see Z (height above the sensor) and X (position side to side) appear in the serial terminal. In addition to providing Z- and X- axis data about an object, the ZX Sensor is also capable of detecting simple gestures. To see an example of this, open File → Examples → SparkFun_ZX_Distance_and_Gesture_Sensor → I7C_Gesture_Interrupt. Upload the sketch, and open the Serial Monitor. You should see a message stating that initialization is complete. If you performed the gesture correctly, you should see a message appear in the Serial Monitor. Here is a list of the currently supported gestures. Make sure each gesture begins outside of the range of the sensor, moves into the range of the sensor, and ends outside the range of the sensor. The ZX Sensor, in addition to responding to I 7 C commands, continually transmits ZX data over its UART port. We can connect an directly to the ZX Sensor and read the output. You can use or the (Linux or Mac) to view the output. If you are on a Windows computer, you can use the demo application (linked below) provided by XYZ Interactive to test the ZX Sensor.

Connect the FTDI Breakout board to the ZX Sensor. Ensure the pins on the FTDI Brekaout line up with the pins on the ZX Sensor (e. GRN connects to GRN and BLK connects to BLK). Connect the FTDI Breakout to your computer with a USB cable. Double-click to run the ZX Demo application. Under Input: on the right side, drop down the list and select the COM port that corresponds to your FTDI Breakout (if you need a refresher on find the right COM port, check out of the Terminal Basics tutorial). You do not need to choose an Output: port. Move your hand around above the sensor, and you should see the red ball move. Try out the other tabs in the application! The Z-Control tab lets your try moving your hand toward and away from the sensor, and the Gestures tab computes a few different gestures based on the Z- and X- data. After trying the basic ZX and gesture demos, you can try the other examples in the Arduino library.

If you need some inspiration, check out these related tutorials:

Recent Posts