×

Please see all COVID-19 updates here as some shipments may be delayed due to CDC safety and staffing guidelines. If you have an order or shipping question please refer to our Customer Support page. For technical questions please check out our Forums. Thank you for your continued support.

Member #254471

Member Since: September 26, 2011

Country: United States

  • 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.

  • I'm afraid I kind of have to agree with the people saying this is a waste of time I understand that sparkfun is doing this to reward their customers, but I've been loyal and doing this since 11 eastern when it started and haven't gotten anything for my efforts. i understand the value of random but it would be nice to be guaranteed something for our efforts maybe a 10 dollar credit after a certain number of trys or something?

No public wish lists :(