# AS7265x  Triad Sensor

**URL:** <https://community.sparkfun.com/t/as7265x-triad-sensor/41736>\
**Category:** Imaging\
**Created:** [March 11, 2021, 8:26pm UTC](https://community.sparkfun.com/t/as7265x-triad-sensor/41736 "2021-03-11T20:26:43Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Drizzt321](https://avatars.discourse-cdn.com/v4/letter/d/ce7236/32.png) [@Drizzt321](https://community.sparkfun.com/u/Drizzt321)\
**Post date:** [March 11, 2021, 8:26pm UTC](https://community.sparkfun.com/t/as7265x-triad-sensor/41736/1 "2021-03-11T20:26:43Z")

</div>

For product [https://www.sparkfun.com/products/15050](https://www.sparkfun.com/products/15050), I presume that if I simply don’t activate the LEDs I can use this to detect the spectrum of light emitted from something with active light emissions. Such as use it to get a pretty decent spectrum peaks and intensity for an LED, as to what wavelengths it outputs. At least for each of the channels. Obviously I’d need a MUCH more expensive instrument to detect a full, discrete, spectrum output graph.

---

<div class="post-metadata">

**Author:** ![TS-Chris](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/ts-chris/32/6057_2.png) [@TS-Chris](https://community.sparkfun.com/u/TS-Chris)\
**Post date:** [March 11, 2021, 10:04pm UTC](https://community.sparkfun.com/t/as7265x-triad-sensor/41736/2 "2021-03-11T22:04:34Z")

</div>

Correct, and if you wanted too you could even cut the LED jumpers to (semi) permanently disable them if needed.

---

<div class="post-metadata">

**Author:** ![Drizzt321](https://avatars.discourse-cdn.com/v4/letter/d/ce7236/32.png) [@Drizzt321](https://community.sparkfun.com/u/Drizzt321)\
**Post date:** [March 11, 2021, 10:35pm UTC](https://community.sparkfun.com/t/as7265x-triad-sensor/41736/3 "2021-03-11T22:35:33Z")

</div>

That’s what I figured I could do with this board. Really neat how much is packed onto it! And no need to permanently disable them, since I can turn them on/off via software. It’d be useful to have them still working for if I want to do reflectance checks as well.

Adafruit does have a [[AS7341](https://www.adafruit.com/product/4698) smaller board, but without digging into the specs sheet, looks like while it might individually have a fairly broad wavelength points, including flicker, this tri-board looks like it has better coverage, and probably finer coverage, of different wavelengths. Quite a bit more expensive, but that’s what you get for more hardware!

On the whole, depends on what you need, but I think this tri-board is the way to go for a more general purpose broad use-case. Thanks!]([Adafruit AS7341 10-Channel Light / Color Sensor Breakout [STEMMA QT / Qwiic] : ID 4698 : Adafruit Industries, Unique & fun DIY electronics and kits](https://www.adafruit.com/product/4698))

---

<div class="post-metadata">

**Author:** ![jremington](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/jremington/32/6595_2.png) [@jremington](https://community.sparkfun.com/u/jremington)\
**Post date:** [March 12, 2021, 2:46am UTC](https://community.sparkfun.com/t/as7265x-triad-sensor/41736/4 "2021-03-12T02:46:00Z")

</div>

> And no need to permanently disable them

The power LED is not under software control. You have to cut the jumper to disable it.

That was the very first thing I did, after running the sensor through the full operational tests.

---

<div class="post-metadata">

**Author:** ![Drizzt321](https://avatars.discourse-cdn.com/v4/letter/d/ce7236/32.png) [@Drizzt321](https://community.sparkfun.com/u/Drizzt321)\
**Post date:** [March 12, 2021, 2:49am UTC](https://community.sparkfun.com/t/as7265x-triad-sensor/41736/5 "2021-03-12T02:49:22Z")

</div>

The [https://learn.sparkfun.com/tutorials/sp … okup-guide](https://learn.sparkfun.com/tutorials/spectral-triad-as7265x-hookup-guide) documentation and function calls available seem to indicate they can be. takeMeasurements() vs takeMeasurementsWithBulb(), enableBulb(uint8\_t device) and disableBulb(uint8\_t device).

---

<div class="post-metadata">

**Author:** ![jremington](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/jremington/32/6595_2.png) [@jremington](https://community.sparkfun.com/u/jremington)\
**Post date:** [March 12, 2021, 3:09am UTC](https://community.sparkfun.com/t/as7265x-triad-sensor/41736/6 "2021-03-12T03:09:24Z")

</div>

From the [[Hookup Guide](https://learn.sparkfun.com/tutorials/spectral-triad-as7265x-hookup-guide#hardware-overview):

> In addition to the illumination LEDs, there is a power LED and a status LED. The blue status LED indicates various states of the AS72651 sensor and can be disabled through the SparkFun library. The red power LED is provided to indicate the board is properly energized. If the red light is interfering with readings it can be disabled by cutting the neighboring jumper.

The SECOND thing I did after testing for full functionality was to disable the blue status LED, because it doesn’t seem to provide any useful information.]([Spectral Triad (AS7265x) Hookup Guide - SparkFun Learn](https://learn.sparkfun.com/tutorials/spectral-triad-as7265x-hookup-guide#hardware-overview))

---

<div class="post-metadata">

**Author:** ![Drizzt321](https://avatars.discourse-cdn.com/v4/letter/d/ce7236/32.png) [@Drizzt321](https://community.sparkfun.com/u/Drizzt321)\
**Post date:** [March 12, 2021, 3:12am UTC](https://community.sparkfun.com/t/as7265x-triad-sensor/41736/7 "2021-03-12T03:12:14Z")

</div>

Oh sorry, didn’t completely read, thought you were talking about the RGB/White/IR LEDs, not the power/status LEDs. Yeah, might need to cut/desolder those or something. Or cover with some tape or something.

---

<div class="post-metadata">

**Author:** ![adycousins](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@adycousins](https://community.sparkfun.com/u/adycousins)\
**Post date:** [April 9, 2022, 7:19pm UTC](https://community.sparkfun.com/t/as7265x-triad-sensor/41736/8 "2022-04-09T19:19:34Z")

</div>

sorry for this very basic question; I’d like to disable the bulbs but I’m not clear on exactly how to do this, I see the example: void disableBulb(uint8\_t device); but I’m not clear **how /where one uses this in a sketch** in order to disable all three LED’s (I’m analyzing light through a filter to see the wavelengths emitted and so don’t need the LEDs)

---

<div class="post-metadata">

**Author:** ![YellowDog](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/yellowdog/32/1782_2.png) [@YellowDog](https://community.sparkfun.com/u/YellowDog)\
**Post date:** [April 9, 2022, 9:33pm UTC](https://community.sparkfun.com/t/as7265x-triad-sensor/41736/9 "2022-04-09T21:33:09Z")

</div>

> adycousins:  
> sorry for this very basic question; I’d like to disable the bulbs but I’m not clear on exactly how to do this, I see the example: void disableBulb(uint8\_t device); but I’m not clear **how /where one uses this in a sketch** in order to disable all three LED’s (I’m analyzing light through a filter to see the wavelengths emitted and so don’t need the LEDs)

[https://learn.sparkfun.com/tutorials/sp … okup-guide](https://learn.sparkfun.com/tutorials/spectral-triad-as7265x-hookup-guide)

---

<div class="post-metadata">

**Author:** ![adycousins](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@adycousins](https://community.sparkfun.com/u/adycousins)\
**Post date:** [April 10, 2022, 9:11am UTC](https://community.sparkfun.com/t/as7265x-triad-sensor/41736/10 "2022-04-10T09:11:17Z")

</div>

thanks - I’ve read the hookup guide and have got the board working, however it doesn’t offer an explanation of 'how /where one uses"'void disableBulb(uint8\_t device); ’ in a sketch"

---

<div class="post-metadata">

**Author:** ![jremington](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/jremington/32/6595_2.png) [@jremington](https://community.sparkfun.com/u/jremington)\
**Post date:** [April 10, 2022, 2:47pm UTC](https://community.sparkfun.com/t/as7265x-triad-sensor/41736/11 "2022-04-10T14:47:44Z")

</div>

Put the call wherever it makes sense to turn on or off the lights.

In setup() you can turn the lights off permanently, at program startup. The “settings” example in the Sparkfun library gives examples.

---

<div class="post-metadata">

**Author:** ![adycousins](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@adycousins](https://community.sparkfun.com/u/adycousins)\
**Post date:** [April 10, 2022, 3:43pm UTC](https://community.sparkfun.com/t/as7265x-triad-sensor/41736/12 "2022-04-10T15:43:57Z")

</div>

> jremington:  
> Put the call wherever it makes sense to turn on or off the lights.
> 
> In setup() you can turn the lights off permanently, at program startup. The “settings” example in the Sparkfun library gives examples.

Thanks for the reply, however the settings example doesn't actually include example of usage of the code to disable the bulbs, only to set their current. What I'm not clear about is whether the line of code: 'void disableBulb(uint8\_t device);' requires anything else to specify which LED's to turn off (0,1,2) or whether this line of code in setup will disable all three LED's

---

<div class="post-metadata">

**Author:** ![jremington](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/jremington/32/6595_2.png) [@jremington](https://community.sparkfun.com/u/jremington)\
**Post date:** [April 10, 2022, 4:21pm UTC](https://community.sparkfun.com/t/as7265x-triad-sensor/41736/13 "2022-04-10T16:21:46Z")

</div>

When you have questions about functions in a library, it often helps to glance through the library source code. In the first few lines of the library source file named SparkFun\_AS7265X.cpp, you will find the following statements.

Take note of the disableBulb() calls.

```auto
//Initializes the sensor with basic settings
//Returns false if sensor is not detected
boolean AS7265X::begin(TwoWire &wirePort)
{
  _i2cPort = &wirePort;
  _i2cPort->begin(); //This resets any setClock() the user may have done

  if (isConnected() == false)
    return (false); //Check for sensor presence

  //Check to see if both slaves are detected
  uint8_t value = virtualReadRegister(AS7265X_DEV_SELECT_CONTROL);
  if ((value & 0b00110000) == 0)
    return (false); //Test if Slave1 and 2 are detected. If not, bail.

  setBulbCurrent(AS7265X_LED_CURRENT_LIMIT_12_5MA, AS7265x_LED_WHITE);
  setBulbCurrent(AS7265X_LED_CURRENT_LIMIT_12_5MA, AS7265x_LED_IR);
  setBulbCurrent(AS7265X_LED_CURRENT_LIMIT_12_5MA, AS7265x_LED_UV);

  disableBulb(AS7265x_LED_WHITE); //Turn off bulb to avoid heating sensor
  disableBulb(AS7265x_LED_IR);
  disableBulb(AS7265x_LED_UV);

```

---

<div class="post-metadata">

**Author:** ![adycousins](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@adycousins](https://community.sparkfun.com/u/adycousins)\
**Post date:** [April 10, 2022, 4:30pm UTC](https://community.sparkfun.com/t/as7265x-triad-sensor/41736/14 "2022-04-10T16:30:13Z")

</div>

> jremington:  
> When you have questions about functions in a library, it often helps to glance through the library source code. In the first few lines of the library source file named SparkFun\_AS7265X.cpp, you will find the following statements.
> 
> Take note of the disableBulb() calls.
> 
> ```auto
> //Initializes the sensor with basic settings
> 
> ```

//Returns false if sensor is not detected  
boolean AS7265X::begin(TwoWire &wirePort)  
{  
\_i2cPort = &wirePort;  
\_i2cPort-\>begin(); //This resets any setClock() the user may have done

if (isConnected() == false)  
return (false); //Check for sensor presence

//Check to see if both slaves are detected  
uint8\_t value = virtualReadRegister(AS7265X\_DEV\_SELECT\_CONTROL);  
if ((value & 0b00110000) == 0)  
return (false); //Test if Slave1 and 2 are detected. If not, bail.

setBulbCurrent(AS7265X\_LED\_CURRENT\_LIMIT\_12\_5MA, AS7265x\_LED\_WHITE);  
setBulbCurrent(AS7265X\_LED\_CURRENT\_LIMIT\_12\_5MA, AS7265x\_LED\_IR);  
setBulbCurrent(AS7265X\_LED\_CURRENT\_LIMIT\_12\_5MA, AS7265x\_LED\_UV);

disableBulb(AS7265x\_LED\_WHITE); //Turn off bulb to avoid heating sensor  
disableBulb(AS7265x\_LED\_IR);  
disableBulb(AS7265x\_LED\_UV);

> ```auto
> 
> ```

Thanks for this - I’d looked through the Examples, I wasn’t aware that the details I required were elsewhere - and the line of code oin the hookup guide ( void disableBulb(uint8\_t device); ) doesn’t seem to appear anywhere so that left me somewhat baffled.

---

<div class="post-metadata">

**Author:** ![adycousins](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@adycousins](https://community.sparkfun.com/u/adycousins)\
**Post date:** [April 11, 2022, 1:05pm UTC](https://community.sparkfun.com/t/as7265x-triad-sensor/41736/15 "2022-04-11T13:05:27Z")

</div>

I seem to have managed to disable the LEDs (I think) using the following in the setup

```auto
  sensor.disableIndicator(); //Turn off the blue status LED
  sensor.disableBulb(AS7265x_LED_WHITE); //Turn off bulbs
  sensor.disableBulb(AS7265x_LED_IR);
  sensor.disableBulb(AS7265x_LED_UV);

```

---

<div class="post-metadata">

**Author:** ![jremington](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/jremington/32/6595_2.png) [@jremington](https://community.sparkfun.com/u/jremington)\
**Post date:** [April 11, 2022, 2:15pm UTC](https://community.sparkfun.com/t/as7265x-triad-sensor/41736/16 "2022-04-11T14:15:40Z")

</div>

If the LEDs are off, that would be a good indication.
