Part Number: CC2652R
Hi TI
I have a mini project here on my own.
Currently I have a lunchpad CC2652R with me. I would like to add a I2C temp/humid sensor for reading.
I been reading a few example codes provided by TI explorer. However being new to this coding, I have a hard time understanding the codes.
Would like to seek your advice and help.
One of the C files i looked at was I2ctmp.C to understand how I2C coding works, however I am still confused.
I understand that I2C, we need to send an address hex followed by a command hex. Not sure about the acknowledgement thing too.
I been trying to solve this. I have tried multi_sensor and Multi_role project too. Still trying to understand how do I write these codings to initiate the process I2C command write and read.
Here is a simple logic I trying to do,
1. CC2652R wake up from sleep.
2. Send command to sensor to wake up, and extract data, temp and humid.
3. Display output on Teraterm.
4. Additional is send a BLE message with this data
5. Sleep both MCU and sensor after BLE message send out.
I think I would like to solve 1-3 first before moving onto the BLE portion.
Any kind soul can explain how do I write these codings for 1-3?
Here are some photos I tried using I2ctmp.C file. Modifying the address of the first temp sensor.
However I keep receiving no acknowledgement. Also I cut short the sample from 20 to 10 just for easier testing.
I guess I miss out some part or maybe the example codings is not meant for this sensor.
I am using a SHTC3 sensor. Where the datasheet stats I have to send a wakeup command and a read command to extract data.
But however, I not sure how do I approach this in terms of the C codings. How do I write such code?
One thing I also had first experience with CCS. How do I start with empty.C? What do I need to do?
I did use Arduino before but they are a simple way of adding library in and call the library for the function.
Would be happy to receive some guidance from some expertise in this forum on how do I do this.
I am really excited to develop this mini project. However, I am a hardware engineer. Had no prior firmware coding experiences.
Please do share your insights and help. Really appreciate it.
Thanks and regards
Dan