Hi everyone,
I recently purchased the Triad and an Arduino Uno R4 WiFi.
I was not able to make it work also because the R4 WiFi apparently uses another Wire to connect to the I2C bus, the Wire2.
So I decided to test an Arduino R4 Minima without success.
Then I took out from the drawer an old ESP8266 board and I managed to make it work.
Still I was not happy as I wanted to use an Arduino and I purchased an Arduino Duo which was proven to work in this nice GitHub repo https://github.com/Scottapotamas/AS7265 … /README.md. I tested and it did not work…
I then started to question whether library versions could be a problem and I was really wondering why the ESP8266 worked.
Note that I was using the latest version of the Triad library, the 1.0.4.
Reading this thread I tried to downgrade to 1.0.3 and on the Arduino Duo it seems to work quite well finally.
I took some time to compare what is the difference in the libraries and it seems the 1.0.4 has checks about the response time of the board.
This is for example what you find in the 1.0.4 version:
void AS7265X::takeMeasurements()
{
setMeasurementMode(AS7265X_MEASUREMENT_MODE_6CHAN_ONE_SHOT); //Set mode to all 6-channels, one-shot
//Wait for data to be ready
unsigned long startTime = millis();
while (dataAvailable() == false)
{
if(millis() - startTime > maxWaitTime) return; //Sensor failed to respond
delay(AS7265X_POLLING_DELAY);
}
This same construct is present in few other places in the code and it is as far as I can see the only difference.
So it would be nice if the developer of the code could check and tell which settings should be used to make the 1.0.4 version work.
On top of that, since the Arduino R4 WiFi has a QWIIC connector already, it would also be nice that the code examples would be adapted so that one can use that interface. Now on the Duo I am using an adapter cable with individual pins on one side and a qwiic connector on the other that goes onto into the Triad qwiic famale.
If anyone managed to make the Arduino 4 Wifi work with 1.0.3 or 1.0.4 let me please know how.
//Readings can now be accessed via getCalibratedA(), getJ(), etc
}
and this is what you have for the same function in the 1.0.3:
void AS7265X::takeMeasurements()
{
setMeasurementMode(AS7265X_MEASUREMENT_MODE_6CHAN_ONE_SHOT); //Set mode to all 6-channels, one-shot
//Wait for data to be ready
while (dataAvailable() == false)
delay(AS7265X_POLLING_DELAY);
//Readings can now be accessed via getCalibratedA(), getJ(), etc
}