0

I have an Adafruit AS7262 visible spectral sensor. I want to receive the data of the sensor with an Arduino.
The sensor has two serial communication options: UART(asynchronous) or I2C(synchronous). I want to know which method is more suitable for the sensor to communicate with the Arduino microcontroller. I was thinking that UART is more suitable, because the sensor has his own master clock, in other words if I choose I2C then the Arduino needs to work as the "slave" and I dont think that is very suitable, because the Arduino has its own master clock also. For this reason I think that asynchronous method is more reliable, but I am not sure about this.

2 Answers 2

1

The I2C on this device is slave, not a master. Even though it has its own clock, it is designed to operate as a slave being read by a master.

You will have no issues using the I2C interface - in fact Adafruit uses it for their own software library.

Since there is already a I2C-based library available from the manufacturer I would use that, unless there is a good reason to use the UART instead.

0

Arduino will serve as the Master controller and will send the call to the slaves. AS7262 is a sensor device, Arduino will send the call commmand then receive the data from its sensors. Sometime confusion arrises because developers are accustomed to the desktop computer as the Master, but in this case, Arduino receives data and engage a forward action like sending info to USB or WiFi connected computer or just do a feedback control to another digital or analog device.

You will find further reading on this subject at Arduino community here

Also

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.