Hobbyist Toolkit

cancel
Showing results for 
Search instead for 
Did you mean: 

AS7341 10 channel spectrometer I2C

Solved!
Go to solution

Hi, I am trying to get the communication to work between Labview, Arduino, and AS7341.

I am first trying to get the LED to light up as this would show me the communication is working fine.

However, currently, I am unable, this is my first project using an Arduino together with Labview 

the code is not optimized I wanted to see what is happening.

Something is going wrong but I am stuck at the moment. 

It seems I can write data over the I2C and read Data  and do not get any error messages

My code looks like this: 

 

StefPVMD_0-1643374004612.png

 

 

0 Kudos
Message 1 of 3
(863 Views)
Solution
Accepted by StefPVMD

Hi,

 

You may need to set bit 4 (REG_BANK) of the CFG0 Register (Address 0xA9) before you write to registers in the range 0x60 to 0x74. You will need to clear bit 4 to access registers above 0x80. 

 

The value you are writing to the LED Register (Address 0x74) may be too high for the LEDs on your module. Perhaps try a value of 0x84?

 

Cheers,
Andy.

Message 2 of 3
(794 Views)

Hi Andy, thank you very much I greatly appreciate you taking your time to help me out, this solved the issue,
I overlooked it while going through the datasheet.
I also adjusted the led current to be sure and started from the lowest setting.
Now continuing with the project, I have eight of these sensors that I will control through a TCA9548A.
Getting the 8th LED's on now works.
If I get this to work, I will upgrade further if possibly to 64 pcs.

Best regards
Stefaan

0 Kudos
Message 3 of 3
(757 Views)