初始化提交

This commit is contained in:
王立帮
2024-07-20 22:09:06 +08:00
commit c247dd07a6
6876 changed files with 2743096 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
#include <DFRobot_TCS34725.h>
DFRobot_TCS34725 tcs = DFRobot_TCS34725(TCS34725_INTEGRATIONTIME_50MS, TCS34725_GAIN_4X) ;
void setup()
{
Serial.begin(9600);
Serial.println("Color View Test!");
if (tcs.begin()) {
Serial.println("Found sensor");
} else {
Serial.println("No TCS34725 found ... check your connections");
while (1);
}
}
void loop()
{
Serial.print("R: "); Serial.print(tcs.getRed());Serial.print(", ");
Serial.print("G: "); Serial.print(tcs.getGreen());Serial.print(", ");
Serial.print("B: "); Serial.println(tcs.getBlue());
delay(10);
}