This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

cc2541 SimpleBLEPeripheral and i2c sensor.

Other Parts Discussed in Thread: CC2541

Hi all

I am working with a CC2541 with SimpleBLEPeripheral project on it, and I want to be able to read the value that a i2c sensor (in my case HTU21D)

i saw the sample files of C:\CC2541_43_44_45_Peripherals_Software_Examples\software_examples\i2c

and I see the master read data from a slave in the i2c_master_recieve file, and that code dont use any hal_sensor.h or hal_gyro.h indeed it dont use any other file 

On the otherside I take the sensorTag sample project to see how its done here, and it is too diferent to the i2c example, and i think that its because it use the drivers of each sensor but with my sensor i cant do this, right?

i try to add the code of i2c example into the performPeriodicTask function but i am not sure if this is correct, because it seems that i2c is handle by interrupts

the question is how i can work with my sensor and the simpleBLEPeripheral project? and which example i should follow the i2c example or sensorTag?

in case It was sensorTag, how I use all the files like hal_acc hal_gyro because those are made for those sensors but i dont have any for HTU21D

thanks