Electrical hookup

We need an Arduino that can connect to a network. It can be either an Arduino with an Ethernet Shield, or as we are using, an Arduino Ethernet.

Level shifting: if you are using a 5V Arduino, you’ll need to use a level-shifter to convert the 5V Signal to 3.3V that the sensor uses.

The APDS-9960 breakout board provides six pins to provide power to the sensor and I2C bus. We’ll only use five of those pins.

Arduino pin

Gesture sensor pin

D2

INT

3.3V

VCC

GND

GND

A4

SDA

A5

SCL

When using a level converter, pass the data signals SDA,SCL and INT through pins A1, A2 and A3 of the level converter. This converts 3.3V on the sensor side to 5V that the Arduino needs and vice versa. Connect the HV pin of the level converter to the 5V pin of the Arduino and the LV pin to the 3.3V pin of the Arduino.

Arduino library installation

Our Arduino code needs two libraries, one to talk to the gesture sensor, another one to implement the WebSocket server. Download them from their respective Github repositories: