Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:iot-open:practical:hardware:sut:esp32:emb9b_1 [2025/04/28 20:30] – [Steps] pczekalskien:iot-open:practical:hardware:sut:esp32:emb9b_1 [2025/04/28 20:34] (current) – [FAQ] pczekalski
Line 52: Line 52:
 Declare and instantiate the TCS controller class and related variables for readings: Declare and instantiate the TCS controller class and related variables for readings:
 <code c> <code c>
 +#define SCL 4
 +#define SDA 5
 +
 static Adafruit_TCS34725 tcs = Adafruit_TCS34725(TCS34725_INTEGRATIONTIME_300MS, TCS34725_GAIN_1X); static Adafruit_TCS34725 tcs = Adafruit_TCS34725(TCS34725_INTEGRATIONTIME_300MS, TCS34725_GAIN_1X);
 uint16_t r, g, b, c, colorTemp, lux; uint16_t r, g, b, c, colorTemp, lux;
Line 65: Line 68:
 Initialise the sensor (in ''void Setup()'') and check it is OK: Initialise the sensor (in ''void Setup()'') and check it is OK:
 <code c> <code c>
-  Wire.begin(5,4); //5 (SDA) 4 (SCL) +  Wire.begin(SDA,SCL);
   delay(100);   delay(100);
   ...   ...
Line 93: Line 96:
  
 ===== FAQ ===== ===== FAQ =====
-**What is the range of the values for the integration time of the TCS sensor?**:+**What is the range of the values for the //integration time// of the TCS sensor?**:
 <code c> <code c>
 #define TCS34725_INTEGRATIONTIME_2_4MS                                         \ #define TCS34725_INTEGRATIONTIME_2_4MS                                         \
Line 135: Line 138:
 </code> </code>
  
-**What is the range of the values for the gain of the TCS sensor?**:+**What is the range of the values for the //gain// of the TCS sensor?**:
 <code c> <code c>
 typedef enum { typedef enum {
Line 145: Line 148:
 </code> </code>
  
-**C channel reading is 0 and R, G or B readings are not reasonable**It is possibly because overdrive of the sensor with a light source (too bright). Consider lowering the RGB LED's intensity or change sensor's integration time and gain (shorter time, lower gain).+**C channel reading is 0and R, G or B readings are unreasonable.** It is possibly because of overdriving the sensor with a light source (too bright). Consider lowering the RGB LED's intensity or changing the sensor's integration time and gain (shorter time, lower gain).
  
 <WRAP noprint> <WRAP noprint>
en/iot-open/practical/hardware/sut/esp32/emb9b_1.1745872214.txt.gz · Last modified: 2025/04/28 20:30 by pczekalski
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0