No/poor data from AS7331 sensor

Me and my team have been trying to use the Sparkfun AS7311 Mini Spectral UV Sensor ( SEN-23518 ) with the SparkFun Qwiic Pro Micro ( DEV-15795 ) and we’ve had trouble getting sensible readings from the sensor. We are using the [ library made by Sparkfun for the AS7331. We are planning to use the continuous mode.

Using the included continuous read and the one shot example we faced a couple weird errors:

  • At first, nothing would print out from the serial monitor other than the initial “AS7331… example”

  • At a later time, the micro controller randomly (running the exact same sketch) was able to print out “readings” but they were all 0
  • Both sketches exhibited this behavior. Where on the first try it did not print any readings, then the next day it printed out 0’s.

    We also tried using the SYND mode example included with the library with marginal success. The sketch printed out readings but the UVA channel was the only one to respond to UV light and with a very low reported value. Readings were in the decimals, ranging from 0.1 - 0.12 . Attempting to use the setGain function to remedy the low values fails and returns an error value.

    For CONT mode, pin 7 on the Pro Micro was connected to INT on the UV sensor board.

    For SYND mode, pin 4 on the Pro Micro was connected to SYN on the UV sensor board.

    All other connections were through the Qwiic connector.

    Images of the two boards wired for continuous mode and serial monitor print outs are at this [imgur link.

    Is there something we are overlooking? Is there more documentation for the library/board than the hook up guide?

    Thank you in advance!](Sparkfun Pro Micro USB C + AS7331 Sensor Board - Album on Imgur)](GitHub - sparkfun/SparkFun_AS7331_Arduino_Library)

    Make sure your board selection is “Pro micro” and processor is “ATmega32U4 (5V, 16MHz)” - are you hitting the reset button on the pro micro after uploading the sketch?

    It also might help to verify the regular blink sketch works https://learn.sparkfun.com/tutorials/qw … ello-world (or even better test it with a different sensor/MCU if you have any available) and see if you can narrow down which piece is the guilty suspect