Maker.io main logo

How to Use APDS9960 Gesture Sensor With Arduino

2026-09-08 | By Ron Cutts

License: GNU Lesser General Public License Bluetooth / BLE Displays Arduino ESP32

In this tutorial, we will learn how to use the APDS9960 gesture sensor with Arduino to display hand directions on the OLED display using Visuino software.

Watch the video!

Learn more about Visuino: What is Visuino

What You Will Need

What You Will Need

What You Will Need photo 2

What You Will Need photo 3

What You Will Need photo 4

What You Will Need photo 5

What You Will Need photo 6

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]

The Circuit

Start Visuino, and Select the Arduino UNO Board Type

To start programming the Arduino, you will need to have the Arduino IDE installed from here: https://www.arduino.cc/.

Please be aware that there are some critical bugs in Arduino IDE 1.6.6. Make sure that you install 1.6.7 or higher; otherwise, this will not work! If you have not done so, follow the steps to set up the Arduino IDE to program Arduino UNO! The Visuino: https://www.visuino.eu also 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 in Picture 2

Start Visuino, and Select the Arduino UNO Board Type

Start Visuino, and Select the Arduino UNO Board Type photo 2

In Visuino ADD and Set Components

  • Add "Gesture Color Proximity APDS9960 I2C" component

  • Add "Text Value" component
    Double click on the "TextValue1" component and in the Elements window drag 4x "Set Value" to the left side
    Select "SetValue1" on the left side and in the properties window set value to UP
    Select "SetValue2" on the left side and in the properties window set value to DOWN
    Select "SetValue3" on the left side and in the properties window set value to LEFT
    Select "SetValue4" on the left side and in the properties window set value to RIGHT
    Close the elements window

  • Add "SSD1306/SH1106 OLED Display (I2C)" component
    Double click on the "DisplayOLED1" component and in the Elements window drag "Text Field" to the left side
    On the Left side select TextField1 and in the properties window set size to 3
    Close the elements window

In Visuino ADD and Set Components

In Visuino ADD and Set Components photo 2

In Visuino ADD and Set Components photo 3

In Visuino ADD and Set Components photo 4

In Visuino ADD and Set Components photo 5

In Visuino ADD and Set Components photo 6

In Visuino ADD and Set Components photo 7

In Visuino Connect Components

  • Connect "GestureColorProximity1" pin "Up" to "TextValue1">"SetValue1" pin [In]

  • Connect "GestureColorProximity1" pin "Down" to "TextValue1">"SetValue2" pin [In]

  • Connect "GestureColorProximity1" pin "Left" to "TextValue1">"SetValue3" pin [In]

  • Connect "GestureColorProximity1" pin "Right" to "TextValue1">"SetValue4" pin [In]

  • Connect "GestureColorProximity1" I2C pin "Out" to Arduino Board pin I2C [In]

  • Connect "GestureColorProximity1" I2C pin "Out" to "DisplayOLED1" > "TextField1" pin [In]

  • Connect "DisplayOLED1" I2C pin "Out" to Arduino Board pin I2C [In]

In Visuino Connect Components

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.

Generate, Compile, and Upload the Arduino Code

Play

If you power the Arduino UNO module, and the move the hand over the gesture sensor the OLED Display should show the direction of the hand gesture.

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

Downloads

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.