Recently I purchased Hamamatsu C12880 MA mini-spectrometer along with its evaluation board (https://www.seeedstudio.com/Hamamatsu-C12880MA-MEMS-u-Spectrometer-and-Breakout-Board-p-2916.html).
I want to subtract ambient/surrounding light when I turn on the white LED and point it toward object of interest. How should I implement this code?
The logic of my current code which does not work is as follows -
Upon a keystroke say ‘d’, I count 3 seconds, take readings from spectrometer in an array, then turn on the white LED, count 3 seconds, take readings again. And then subtract second array from first.
With this approach, I was expecting to see only waveform which the object of interest would reflect back but I am getting incorrect output in ‘processing’ executable. The ‘processing’ executable is from the sample code provided by seeed (https://github.com/groupgets/c12880ma).
All the connections are all correct.
Is my approach described above not correct? I want to subtract surrounding light after I turn on the LED or laser so that I can get correct spectrum of the light reflected by object of interest.
Any help is much appreciated.
I can share my code and the screenshot if it’s going to help.