Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1

Anonymous
Not applicable

Dear all,

   

I'm new on PSoC and I got a problem of communication between a light sensor TSL2561 and my PSoC 5

   

(here the doc of the sensor : https://cdn-shop.adafruit.com/datasheets/TSL25911_Datasheet_EN_v1.pdf )

   

I can see the buffer on the debug mode but theres are empty, and my sensor don't write his data inside. The datasheet of the sensor talk about perform a four-byte I2C read operation using the auto-increment in the page 17, but I don't understand what is this.

   

 

   

My code :

   

#include <project.h>

   

#define TSL_ADDR    0x29

   

int main()
{
    CyGlobalIntEnable; 
    uint8 mwbuff1[7];
    I2C_Start();

   

    for(;;)
    {
        I2C_MasterReadBuf(TSL_ADDR,mwbuff1,7,I2C_MODE_COMPLETE_XFER);

   

        CyDelay(500);
    }
    I2C_Stop();
}

   

 

   

So what I have to add in my code, for read the light sensor's data.

   

 

   

Thanks.

   

Jacque

0 Likes
6 Replies