Distance Proximity Measurement With Gesture Sensor APDS9960

Introduction: Distance Proximity Measurement With Gesture Sensor APDS9960

About: Arduino fan!

In this tutorial we will learn how to measure the distance using a gesture sensor APDS9960, arduino and Visuino.

Watch the video!

Step 1: What You Will Need

  • Arduino UNO (or any other Arduino)
  • APDS9960 Sensor
  • Jumper wires
  • Breadboard
  • OLED Display
  • Visuino program: Download Visuino

Step 2: The Circuit

  • Connect Sensor Pin [GND] to Arduino board pin [GND]
  • Connect Sensor Pin [Vin] to Arduino board pin [3.3V]
  • Connect Sensor Pin [SDA] to Arduino board pin [SDA]
  • Connect Sensor Pin [SCL] to Arduino board pin [SCL]
  • Connect OLED Display Pin [GND] to Arduino board pin [GND]
  • Connect OLED Display Pin [VCC] to Arduino board pin [+5V]
  • Connect OLED Display Pin [SCL] to Arduino board pin [SCL]
  • Connect OLED Display Pin [SDA] to Arduino board pin [SDA]

Step 3: Start Visuino, and Select the Arduino UNO Board Type

The Visuino: https://www.visuino.eu needs to be installed. Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2

Step 4: In Visuino Add Components

  • Add "Gesture Color Proximity APDS9960 I2C" component
  • Add "OLED" component
  • Double click on the "DisplayOLED1"
  • In the Elements window drag "Text Field" to the left, in the properties window set size to 3
  • Close the Elements window
  • Connect "GestureColorProximity1">Proximity pin[Out] to "DisplayOLED1">Text Field1 pin [In]
  • Connect "GestureColorProximity1" I2C pin "Out" to Arduino Board pin I2C [In]
  • Connect "DisplayOLED1" I2C pin "Out" to Arduino Board pin I2C [In]

Step 5: Generate, Compile, and Upload the Arduino Code

In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.

Step 6: Play

If you power the Arduino UNO module, and the move the paper over the gesture sensor the OLED Display should show the distance in mm of the paper.

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Instructable, you can download it and open it in Visuino: https://www.visuino.eu

Be the First to Share

    Recommendations

    • DIY Summer Camp Contest

      DIY Summer Camp Contest
    • Pets Challenge

      Pets Challenge
    • Summer Fun: Student Design Challenge

      Summer Fun: Student Design Challenge

    Comments