Hi, Ive bought 2 Grove Sunlight Sensors from the Arduino Store (Advertised as Rev. 1 with Si1145 Chip) but recieved the Rev. 2 (Si1151 Chip?) and Ive attempted to communicate with the sensor using the 1151 Library, but It doesnt work
Using a Nano RP2040 / MKR WiFi 1010 with Arduino IDE 2.2.1
The I2C Connection does get recognized
Using a Library from Grove - Sunlight Sensor | Seeed Studio Wiki
#include <Wire.h>
#include <SI114X.h>
#include <Si115X.h>
Si115X si1151;
#define WIRE Wire
/**
* Setup for configuration
*/
void setup()
{
uint8_t conf[4];
Wire.begin();
Serial.begin(115200);
if (!si1151.Begin())
Serial.println("Si1151 is not ready!");
else
Serial.println("Si1151 is ready!");
}
/**
* Loops and reads data from registers
*/
void loop()
{
Serial.println(si1151.ReadHalfWord());
Serial.println(si1151.ReadHalfWord_VISIBLE());
Serial.println(si1151.ReadHalfWord_UV());
delay(100);
delay(5000); // wait 5 seconds for next scan
}
but it doesnt recognize “ReadHalfWord”
Does anyone have working Code or a Fuctioning Library for this sensor?
Any ideas how I can troubleshoot this?