AS7265x via Qwiic on a Raspberry Pi 3

Hello everyone!

I’m new to this community and I’m hoping someone can offer me some assistance. I’m trying to connect my AS7265x sensor to my Raspberry Pi3 using Qwiic, but I’m struggling to write the correct Python code to use the sensor. Does anyone have a functional code they could share with me?

Additionally, once I’m able to collect data from the sensor, I would like to display it both in numerical format and as graphs. Can anyone provide guidance on how I could achieve this?

Thank you in advance for any help you can offer me. I really appreciate it!

IMG_0276

I wasn’t able to get it to work with these Python codes.

https://github.com/makoike/SparkFun_AS7265x_Python_Lib

https://github.com/LiamsGitHub/AS7265x-spectrometer

I had always this Probelm while trying my code:

"Traceback (most recent call last):

File “/home/FactoryLab/example2.py”, line 6, in

i2c = SMBus(1)

FileNotFoundError: [Errno 2] No such file or directory"

To avoid the “No such file or directory” error when using the SMBus library, you can make sure that the I2C interface is enabled on your Raspberry Pi by following these steps:

Open a terminal window on your Raspberry Pi.

Type sudo raspi-config and press Enter.

Use the arrow keys to select “Interfacing Options” and press Enter.

Select “I2C” and press Enter.

Select “Yes” to enable the I2C interface and press Enter.

Reboot your Raspberry Pi by typing sudo reboot and pressing Enter.

After the reboot, you should be able to use the SMBus library without encountering the “No such file or directory” error.

I am currently optimizing the code for this build, which is shown in the first post. Once I have finished, I will share it with the community.