Apds9960 Rgb Gesture Sensor Detection I2C Breakout Module For Arduino
Rs. 176.00 Rs. 212.00
- Brand: https://www.broadcom.com/products/optical-sensors/integrated-amb
- Product Code: SEN-GESTUER
- SKU -
- Availability: In Stock
- Price in reward points: 3
- For Bulk Order 9962060070
Quick support on WhatsApp (+919962060070) only between morning 11am-4pm, no call will be answered
SPECIFICATIONS: | |
-Model | APDS9960 |
-Input Voltage (Volt) | 3.3 |
-Operating Current (mA) | 790 |
-Operating Range (cm) | 10 – 20 |
-Operating Temperature (°C) | -30 ~ +85 |
-Interface | Digital |
OVERVIEW: | |
Operational Voltage : | 3.3V. |
Operating Range : | 4-8in (10-20cm). |
Ambient Light & RGB Color Sensing. | |
Proximity Sensing. | |
Gesture Detection. | |
I2C Interface (I2C Address: 0x39). |
PACKAGE INCLUDES:
1 PCS x Apds9960 Rgb Gesture Sensor
https://www.broadcom.com/products/optical-sensors/integrated-ambient-light-and-proximity-sensors/apds-9960
//SOURCE CODE TAKEN FROM BELOW LINK
//http://arduinolearning.com/code/arduino-and-apds-9960-sensor-example.php
#include <Wire.h>
#include <SparkFun_APDS9960.h>
// Pins
#define APDS9960_INT 2 // Needs to be an interrupt pin
// Constants
// Global Variables
SparkFun_APDS9960 apds = SparkFun_APDS9960();
int isr_flag = 0;
void setup() {
// Set interrupt pin as input
pinMode(APDS9960_INT, INPUT);
// Initialize Serial port
Serial.begin(9600);
Serial.println();
Serial.println(F("--------------------------------"));
Serial.println(F("SparkFun APDS-9960 - GestureTest"));
Serial.println(F("--------------------------------"));
// Initialize interrupt service routine
attachInterrupt(0, interruptRoutine, FALLING);
// Initialize APDS-9960 (configure I2C and initial values)
if ( apds.init() ) {
Serial.println(F("APDS-9960 initialization complete"));
} else {
Serial.println(F("Something went wrong during APDS-9960 init!"));
}
// Start running the APDS-9960 gesture sensor engine
if ( apds.enableGestureSensor(true) ) {
Serial.println(F("Gesture sensor is now running"));
} else {
Serial.println(F("Something went wrong during gesture sensor init!"));
}
}
void loop() {
if( isr_flag == 1 ) {
detachInterrupt(0);
handleGesture();
isr_flag = 0;
attachInterrupt(0, interruptRoutine, FALLING);
}
}
void interruptRoutine() {
isr_flag = 1;
}
void handleGesture() {
if ( apds.isGestureAvailable() ) {
switch ( apds.readGesture() ) {
case DIR_UP:
Serial.println("UP");
break;
case DIR_DOWN:
Serial.println("DOWN");
break;
case DIR_LEFT:
Serial.println("LEFT");
break;
case DIR_RIGHT:
Serial.println("RIGHT");
break;
case DIR_NEAR:
Serial.println("NEAR");
break;
case DIR_FAR:
Serial.println("FAR");
break;
default:
Serial.println("NONE");
}
}
}
https://youtu.be/A3QRyixnEl8
15 days