Questions about Hamamatsu mini-spectrometer evaluation board (Hamamatsu C12880MA)

Recently I purchased Hamamatsu C12880 MA mini-spectrometer along with its evaluation board (
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 (

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.


Hi @ssn
I have feedback about your problem with our supplier.
In the meaning time, you can share your code and the screenshot in case need you to provide relevant information for analysis.
Please wait patiently.