Grove Sunlight Sensor Library doesn't Work

So this builds fine, however I do get the same errors and I get a sequence of device ready then not ready even when I rebuild the code, and the reset the device

Hi there,
OK that’s looks as I would expect, can you try with BSP 2.0.8 ?
is there any device address associated with the device?
GL :slight_smile: PJ

Hi, so I have tried this with 2.0.8,2.0.11 and 2.0.14. The address is 0x53 at least that’s what the I2C address is when I tried that

Ok, Try this with the delay’s…

// Sunlite..
#include "Si115X.h"

Si115X si1151;

/**
 * Setup for configuration
 */
void setup()
{
     Serial.begin(9600);
    delay (2000);
    Wire.begin();
   delay (500);
    if (!si1151.Begin(0x53)) {
        Serial.println("Si1151 is not ready!");
        while (1) {
            delay(1000);
            Serial.print(".");
        };
    }
    else {
        Serial.println("Si1151 is ready!");
    }
}

/**
 * Loops and reads data from registers
 */
void loop()
{
    Serial.print("IR: ");
    Serial.println(si1151.ReadIR());
    delay (500);
    Serial.print("Visible: ");
    Serial.println(si1151.ReadVisible());
    delay(500);
     //Serial.println(si1151.ReadUV());
    //delay(500);
}

Lmk,
So , I’m down to Defective device?, or the wire lib is broken, or needs 2wire.lib ?
more info needed, Can you post a pic of the Hardware setup?
HTH
GL :slight_smile: PJ

Oh wow that finally works thank you so much. I have attached the pictures. Also I was wondering do I just not use the ReadUV and keep the other two sensors running.

1 Like

Good job PG… you done it again!

Hello everyone,
After testing, we have now updated the code about Grove Sunlight Sensor library related. Hope it can solve your problem

2 Likes

Good job! Thanks for the hard work…

1 Like

Hi There,
Great, sometimes it’s the subtleties of the devices an the code to work them.
Way to stay with it to a solution. You can remove the UV line, that’s for the 11145.
be sure to mark the delay’s post as solution so others can find it. :wink: :+1:
GL :slight_smile: PJ

1 Like

can you guys check on this one… the software does not expose all the advertised features

TIP

The gesture functionality is not supported yet, since this functionality needs algorithms provided by AMS. We will update this library as soon as we get the support from AMS.

Example 1 per wiki… i googled and did not find any results

Hello @cgwaltney , currently we do not have plans for that feature yet, and the gesture functionality is still not supported. We sincerely apologize for any inconvenience this may cause you.