久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 8499|回復: 7
收起左側

GY-9960-3.3APDS-9960模塊源代碼(RGB紅外手勢傳感+感應運動方向識別)

[復制鏈接]
ID:402205 發表于 2018-9-25 15:37 | 顯示全部樓層 |閱讀模式
   GY-9960-3.3APDS-9960模塊,RGB紅外手勢傳感+感應運動方向識別模塊,供大家學習使用。

arduino源程序如下:
  1. /****************************************************************
  2. ColorSensor.ino
  3. APDS-9960 RGB and Gesture Sensor
  4. Shawn Hymel @ SparkFun Electronics
  5. October 15, 2014
  6. https://github.com/sparkfun/APDS-9960_RGB_and_Gesture_Sensor

  7. Tests the color and ambient light sensing abilities of the
  8. APDS-9960. Configures APDS-9960 over I2C and polls the sensor for
  9. ambient light and color levels, which are displayed over the
  10. serial console.

  11. Hardware Connections:

  12. IMPORTANT: The APDS-9960 can only accept 3.3V!

  13. Arduino Pin  APDS-9960 Board  Function

  14. 3.3V         VCC              Power
  15. GND          GND              Ground
  16. A4           SDA              I2C Data
  17. A5           SCL              I2C Clock

  18. Resources:
  19. Include Wire.h and SparkFun_APDS-9960.h

  20. Development environment specifics:
  21. Written in Arduino 1.0.5
  22. Tested with SparkFun Arduino Pro Mini 3.3V

  23. This code is beerware; if you see me (or any other SparkFun
  24. employee) at the local, and you've found our code helpful, please
  25. buy us a round!

  26. Distributed as-is; no warranty is given.
  27. ****************************************************************/

  28. #include <Wire.h>
  29. #include <SparkFun_APDS9960.h>
  30. #include <LiquidCrystal.h>
  31. // Global Variables
  32. SparkFun_APDS9960 apds = SparkFun_APDS9960();
  33. uint16_t ambient_light = 0;
  34. uint16_t red_light = 0;
  35. uint16_t green_light = 0;
  36. uint16_t blue_light = 0;
  37. LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
  38. void setup() {
  39.   
  40.   // set up the LCD's number of columns and rows:
  41.   lcd.begin(16, 2);
  42.   // Print a message to the LCD.

  43.   
  44.   
  45.   // Initialize Serial port
  46.   Serial.begin(9600);
  47.   Serial.println();
  48.   Serial.println(F("--------------------------------"));
  49.   Serial.println(F("SparkFun APDS-9960 - ColorSensor"));
  50.   Serial.println(F("--------------------------------"));
  51.   
  52.   // Initialize APDS-9960 (configure I2C and initial values)
  53.   if ( apds.init() ) {
  54.     Serial.println(F("APDS-9960 initialization complete"));
  55.   } else {
  56.     Serial.println(F("Something went wrong during APDS-9960 init!"));
  57.   }
  58.   
  59.   // Start running the APDS-9960 light sensor (no interrupts)
  60.   if ( apds.enableLightSensor(false) ) {
  61.     Serial.println(F("Light sensor is now running"));
  62.   } else {
  63.     Serial.println(F("Something went wrong during light sensor init!"));
  64.   }
  65.   
  66.   // Wait for initialization and calibration to finish
  67.   delay(500);
  68. }

  69. void loop() {
  70.   
  71.   // Read the light levels (ambient, red, green, blue)
  72.   if (  !apds.readAmbientLight(ambient_light) ||
  73.         !apds.readRedLight(red_light) ||
  74.         !apds.readGreenLight(green_light) ||
  75.         !apds.readBlueLight(blue_light) ) {
  76.     Serial.println("Error reading light values");
  77.   } else {
  78.      
  79.     Serial.print("Ambient: ");
  80.     Serial.print(ambient_light);
  81.     lcd.setCursor(1, 0);
  82.      lcd.print(red_light);
  83.     Serial.print(" Red: ");
  84.     Serial.print(red_light);
  85.      lcd.setCursor(7, 0);
  86.       lcd.print(green_light);
  87.     Serial.print(" Green: ");
  88.     Serial.print(green_light);
  89.      lcd.setCursor(1, 1);
  90.      lcd.print(blue_light);
  91.     Serial.print(" Blue: ");
  92.     Serial.println(blue_light);
  93.   }
  94.   
  95.   // Wait 1 second before next reading
  96.   delay(10);
  97. }
復制代碼

所有資料51hei提供下載:
GY-9960-3.3APDS-9960模塊RGB紅外手勢傳感 感應運動方向識別模塊.zip (307.65 KB, 下載次數: 87)
回復

使用道具 舉報

ID:104477 發表于 2018-10-11 02:03 來自手機 | 顯示全部樓層
具體應用是什么
回復

使用道具 舉報

ID:420962 發表于 2018-11-8 17:57 | 顯示全部樓層
這個感應距離是多少,具體能感應哪些手勢動作,有沒有51的源碼
回復

使用道具 舉報

ID:297148 發表于 2018-11-10 17:21 | 顯示全部樓層
APDS-9960現在流行嗎?有沒其他的手勢產品可以做
回復

使用道具 舉報

ID:461581 發表于 2019-1-5 17:10 | 顯示全部樓層
不錯,可以發給我郵箱嗎,黑幣不足,非常感謝
回復

使用道具 舉報

ID:513258 發表于 2019-8-26 21:02 | 顯示全部樓層
09.jpg
回復

使用道具 舉報

ID:671549 發表于 2020-1-11 11:18 | 顯示全部樓層
有沒有51的源碼  借鑒一下  非常感謝
回復

使用道具 舉報

ID:672792 發表于 2020-1-24 19:55 | 顯示全部樓層
好資料,感謝
回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

手機版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表
主站蜘蛛池模板: 国产成人在线免费 | 盗摄精品av一区二区三区 | 亚洲精品99| 国产伦精品一区二区三区高清 | 国产精品久久久久久久久久久免费看 | 国产一区二区精品在线 | 综合亚洲视频 | 91国内外精品自在线播放 | 欧美日韩在线免费 | 国产丝袜一区二区三区免费视频 | 伊人91在线 | 中文字幕一区在线观看视频 | 欧美国产激情二区三区 | 激情a| 欧美精品一区二区三区四区 | 亚洲电影免费 | 国产精品成人一区二区三区吃奶 | 午夜精品久久久久久久久久久久久 | 久久成人国产 | 亚洲日韩中文字幕 | 亚洲一区在线播放 | 精品一区二区三区四区五区 | 国产精品久久久久久一区二区三区 | 欧美中文一区 | 免费一区二区 | 一区二区免费 | 亚洲精品乱码 | 日韩视频在线一区 | 国产精品久久影院 | 国产精品久久久久一区二区三区 | 亚洲永久入口 | 天天干夜夜拍 | 91精品国产91久久综合桃花 | 国产美女在线播放 | 国产精品视频久久 | 成人亚洲视频 | 免费观看毛片 | 久久亚洲综合 | 国产免费拔擦拔擦8x高清 | 国产99久久久国产精品下药 | 国产精品一区二区三区在线 |