Comments: AS726X NIR/VIS Spectral Sensor Hookup Guide

Pages

Comments 7 comments

  • Hi,

    I notice that both the AS7262 and AS7263 have the same address. Is there anyway they can be used through the same bus? Is there any external pin that can put in IDLE one of the sensors while reading the other one?

  • Hi,

    Do you know what the Calibrated Measurements represents ? What is the difference between “getBlue” and “getCalibratedBlue” ? I wonder what the measures are calibrated to.

    Thanks!

    • Hi Dear,

      In the latest version of the library, it doesn’t make a difference. In the earlier versions, getRed() will give you an integer and getCalibratedRed() will give more accurate floating point numbers.

  • There are a few errors with this tutorial I think I should point out. First: the takeMeasurements () function should be called takeMeasurementsMode3 (), as the second line of this function in the library sets the device in mode 3. Now yes to use mode 3 according to the data sheet: “to perform a new One-Shot sequence, the control register BANK bits should be written with a value of Mode 3 again.” Meaning that after each mode 3 reading the code needs to set the sensor to mode 3 again. This is fine for the simple example, however in the Sensor Settings example the sensor is initialized in mode 0 this is continuous reading of channels V, B, G, Y and channels O, R aren’t read and will therefore appear as 0 if printMeasurements () is used. But in calling takeMeasurements first in the 2nd example sketch you are overriding any mode selection made during initialization by changing to mode 3 every time through the loop. This is the only reason both sketches produce the same output. If printMeasurements() had been used without takeMeasurements () in the second sketch R and O should be 0 because mode 0 only reads BANK 1 which is V, B, G, and Y. I don’t have the AS7262 to test this but I have done it on the NIR version and by removing the takeMeasurements() from the second example the code still runs but R and W are 0 for every iteration because they are read in mode 1 not mode 0. The second problem is with the setIntegrationTime function. It says the integration time will be the value in the setIntegrationTime function * 2.8ms. This is only true when using mode 0 or 1. Mode 2 & 3 read both banks providing 6 readings, again from the data sheet: “ Minimum IT for a single bank conversion is 2.8 ms. If data is required from all 6 photodiodes then the device must perform 2 full conversions (2 x Integration Time).” The data sheet also says that “Integration time = <value> * 2.8ms” So the integration time for mode 2 and 3 is 2integration value2.8ms.


If you've found a bug or have other constructive feedback for our tutorial authors, please send us your feedback!