I like to use three RGB Sensors TCS34725 on U3-LV for measuring the change of colors in liquids. (similar to a photometer).
Is it possible to connect them to the I2C Bus and read data of three sensors ?
Are there any examples in Delphi, how to code the I2C bus?
Best regards, Mike
The U3-LV can be connected to the TCS34725 RGB sensor, we suggest connecting digital sensors to the EIOx or CIOx lines of the U3 to allow for slightly better signal quality of the logic levels at higher clock speeds.
We don't have any I2C example code specifically for the TCS34725 currently written in Delphi however we do have a lot of resources that you can reference as you try to get off the ground.
For this sensor I suggest you start by making 3 basic functions, and after getting basic communication going you can make others as required:
If you are having issues with getting started, I suggest double checking that you have properly installed pull-up resistors, check to make sure you are configuring the UD library with a 7-bit slave address and not an 8-bit slave address (the UD driver automatically reserves the last bit to indicate read vs write I2C operations), and that you are correctly powering the sensor. After that you may need to pick up a logic analyzer or an oscilloscope to see if you are transmitting the data correctly. Our I2C simulator page is oriented towards the T4 and T7, however some customers have found it useful to help understand the I2C protocol itself.