-
大小: 3.28MB文件类型: .rar金币: 1下载: 0 次发布日期: 2023-11-07
- 语言: 其他
- 标签: GY-9960Keil Arduino
资源简介
GY-9960-3.3APDS-9960模块RGB红外手势传感 感应运动方向识别模块,,,
这是 RGB和姿态传感器,小钢板与内置传感器,提供9960环境光和色彩检测和非接触测量,测量距离,手势。
代码片段和文件信息
/**
* @file SparkFun_APDS-9960.cpp
* @brief Library for the SparkFun APDS-9960 breakout board
* @author Shawn Hymel (SparkFun Electronics)
*
* @copyright This code is public domain but you buy me a beer if you use
* this and we meet someday (Beerware license).
*
* This library interfaces the Avago APDS-9960 to Arduino over I2C. The library
* relies on the Arduino Wire (I2C) library. to use the library instantiate an
* APDS9960 object call init() and call the appropriate functions.
*
* APDS-9960 current draw tests (default parameters):
* Off: 1mA
* Waiting for gesture: 14mA
* Gesture in progress: 35mA
*/
#include
#include
#include “SparkFun_APDS9960.h“
/**
* @brief Constructor - Instantiates SparkFun_APDS9960 object
*/
SparkFun_APDS9960::SparkFun_APDS9960()
{
gesture_ud_delta_ = 0;
gesture_lr_delta_ = 0;
gesture_ud_count_ = 0;
gesture_lr_count_ = 0;
gesture_near_count_ = 0;
gesture_far_count_ = 0;
gesture_state_ = 0;
gesture_motion_ = DIR_NONE;
}
/**
* @brief Destructor
*/
SparkFun_APDS9960::~SparkFun_APDS9960()
{
}
/**
* @brief Configures I2C communications and initializes registers to defaults
*
* @return True if initialized successfully. False otherwise.
*/
bool SparkFun_APDS9960::init()
{
uint8_t id;
/* Initialize I2C */
Wire.begin();
/* Read ID register and check against known values for APDS-9960 */
if( !wireReadDataByte(APDS9960_ID id) ) {
return false;
}
if( !(id == APDS9960_ID_1 || id == APDS9960_ID_2) ) {
return false;
}
/* Set ENABLE register to 0 (disable all features) */
if( !setMode(ALL OFF) ) {
return false;
}
/* Set default values for ambient light and proximity registers */
if( !wireWriteDataByte(APDS9960_ATIME DEFAULT_ATIME) ) {
return false;
}
if( !wireWriteDataByte(APDS9960_WTIME DEFAULT_WTIME) ) {
return false;
}
if( !wireWriteDataByte(APDS9960_PPULSE DEFAULT_PROX_PPULSE) ) {
return false;
}
if( !wireWriteDataByte(APDS9960_POFFSET_UR DEFAULT_POFFSET_UR) ) {
return false;
}
if( !wireWriteDataByte(APDS9960_POFFSET_DL DEFAULT_POFFSET_DL) ) {
return false;
}
if( !wireWriteDataByte(APDS9960_CONFIG1 DEFAULT_CONFIG1) ) {
return false;
}
if( !setLEDDrive(DEFAULT_LDRIVE) ) {
return false;
}
if( !setProximityGain(DEFAULT_PGAIN) ) {
return false;
}
if( !setAmbientLightGain(DEFAULT_AGAIN) ) {
return false;
}
if( !setProxIntLowThresh(DEFAULT_PILT) ) {
return false;
}
if( !setProxIntHighThresh(DEFAULT_PIHT) ) {
return false;
}
if( !setLightIntLowThreshold(DEFAULT_AILT) ) {
return false;
}
if( !setLightIntHighThreshold(DEFAULT_AIHT) ) {
return false;
}
if( !wireWriteDataByte(APDS9960_PERS DEFAULT_
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 46310 2016-10-22 16:56 ADSP9960Keil 和Arduino驱动程序\Arduino\9960-3.3-SCH.jpg
文件 4789 2015-07-21 09:45 ADSP9960Keil 和Arduino驱动程序\Arduino\examples\AmbientLightInterrupt\AmbientLightInterrupt.ino
文件 2764 2015-07-21 09:45 ADSP9960Keil 和Arduino驱动程序\Arduino\examples\ColorSensor\ColorSensor.ino
文件 3358 2015-07-21 09:45 ADSP9960Keil 和Arduino驱动程序\Arduino\examples\GestureTest\GestureTest.ino
文件 3729 2015-07-21 09:45 ADSP9960Keil 和Arduino驱动程序\Arduino\examples\ProximityInterrupt\ProximityInterrupt.ino
文件 2409 2015-07-21 09:45 ADSP9960Keil 和Arduino驱动程序\Arduino\examples\ProximitySensor\ProximitySensor.ino
文件 476 2015-07-21 09:45 ADSP9960Keil 和Arduino驱动程序\Arduino\library.properties
文件 359 2015-07-21 09:45 ADSP9960Keil 和Arduino驱动程序\Arduino\LICENSE.md
文件 3423 2015-07-21 09:45 ADSP9960Keil 和Arduino驱动程序\Arduino\README.md
文件 325 2015-07-21 09:45 ADSP9960Keil 和Arduino驱动程序\Arduino\src\README.md
文件 56060 2015-07-21 09:45 ADSP9960Keil 和Arduino驱动程序\Arduino\src\SparkFun_APDS9960.cpp
文件 11127 2015-07-21 09:45 ADSP9960Keil 和Arduino驱动程序\Arduino\src\SparkFun_APDS9960.h
文件 7929 2016-02-05 15:55 ADSP9960Keil 和Arduino驱动程序\Keil C\ADSP9960\ADSP9960_platform.c
文件 451 2016-02-05 15:50 ADSP9960Keil 和Arduino驱动程序\Keil C\ADSP9960\ADSP9960_platform.h
文件 52565 2016-02-05 15:59 ADSP9960Keil 和Arduino驱动程序\Keil C\ADSP9960\SparkFun_ADSP9960.c
文件 10796 2016-02-05 14:59 ADSP9960Keil 和Arduino驱动程序\Keil C\ADSP9960\SparkFun_ADSP9960.h
文件 24914 2013-11-19 10:38 ADSP9960Keil 和Arduino驱动程序\Keil C\Library\CMSIS\CMSIS END USER LICENCE AGREEMENT.pdf
文件 245489 2013-11-26 10:15 ADSP9960Keil 和Arduino驱动程序\Keil C\Library\CMSIS\Device\ST\STM32F0xx\Include\stm32f0xx.h
文件 2223 2013-11-22 18:14 ADSP9960Keil 和Arduino驱动程序\Keil C\Library\CMSIS\Device\ST\STM32F0xx\Include\system_stm32f0xx.h
文件 29871 2013-11-19 10:38 ADSP9960Keil 和Arduino驱动程序\Keil C\Library\CMSIS\Device\ST\STM32F0xx\Release_Notes.html
文件 10069 2013-11-22 18:14 ADSP9960Keil 和Arduino驱动程序\Keil C\Library\CMSIS\Device\ST\STM32F0xx\Source\Templates\arm\startup_stm32f030.s
文件 10718 2013-11-22 18:14 ADSP9960Keil 和Arduino驱动程序\Keil C\Library\CMSIS\Device\ST\STM32F0xx\Source\Templates\arm\startup_stm32f0xx.s
文件 9882 2013-11-22 18:14 ADSP9960Keil 和Arduino驱动程序\Keil C\Library\CMSIS\Device\ST\STM32F0xx\Source\Templates\arm\startup_stm32f0xx_ld.s
文件 8213 2013-11-22 18:14 ADSP9960Keil 和Arduino驱动程序\Keil C\Library\CMSIS\Device\ST\STM32F0xx\Source\Templates\gcc_ride7\startup_stm32f030.s
文件 8686 2013-11-22 18:14 ADSP9960Keil 和Arduino驱动程序\Keil C\Library\CMSIS\Device\ST\STM32F0xx\Source\Templates\gcc_ride7\startup_stm32f0xx.s
文件 8041 2013-11-22 18:14 ADSP9960Keil 和Arduino驱动程序\Keil C\Library\CMSIS\Device\ST\STM32F0xx\Source\Templates\gcc_ride7\startup_stm32f0xx_ld.s
文件 10333 2013-11-22 18:14 ADSP9960Keil 和Arduino驱动程序\Keil C\Library\CMSIS\Device\ST\STM32F0xx\Source\Templates\iar\startup_stm32f030.s
文件 11355 2013-11-22 18:14 ADSP9960Keil 和Arduino驱动程序\Keil C\Library\CMSIS\Device\ST\STM32F0xx\Source\Templates\iar\startup_stm32f0xx.s
文件 10086 2013-11-22 18:14 ADSP9960Keil 和Arduino驱动程序\Keil C\Library\CMSIS\Device\ST\STM32F0xx\Source\Templates\iar\startup_stm32f0xx_ld.s
文件 12612 2013-11-22 18:14 ADSP9960Keil 和Arduino驱动程序\Keil C\Library\CMSIS\Device\ST\STM32F0xx\Source\Templates\system_stm32f0xx.c
............此处省略228个文件信息
- 上一篇:xilinx SP605 原理图lib.rar
- 下一篇:RH124官网教材
相关资源
- ILI9486 3.5TFT液晶屏Arduino驱动
- [高清文字版]Arduino开发从零开始学
- Arduino传感器详解与应用
- 基于ESPDuino的智慧物联开发宝典电子版
- Arduino 负温度系数热敏电阻NTC测温
- Data From arduino to Excel
- arduino+App Inventor+mixly=纯图形化编程实
- 蓝桥杯大赛少儿创意编程Arduino组赛前
- Arduino的LCD12864例程包含库文件
- 米思齐第三方库
- atmega328p心型流水灯
- Arduino 常用库文件
- arduino超声波避障小车
- D1开发板学习资料例程.rar
- OLED原理图、说明、程序51、stm32、Ar
- rfid技术与Arduino开发
- arduino高级开发权威指南(第二版)
- win32控制台与arduino通信
- Arduino-esp32_SoundRecorder.zip
- arduino_libraries库函数大全
- 常用arduino电路原理图
- Visual Micro(visual for arduino)
- 8x8x8光立方PC端上位机软件+arduino下位
- ardublock 中文版
- 基于Arduino开源平台的WIFI视频监控小车
- Arduino Bluetooth RC Car_v1.7_apk
- OLED驱动库、例程、取字软件与资料
- Arduino.Computer.Vision.Programming
- GrblController中文版
- Arduino-Scratch课程
评论
共有 条评论