Hi Fraser Law,
If you want to use the FRDM-KE06 work with your I2C light sensor, you need to know these points:
1. KE06 I2C code,
You can refer to the sample code, please download it from this link:
FRDM-KEXX Driver Library Package
You can find the code in folder:KEXX_DRIVERS_V1.2.1_DEVD\kexx_drv_lib\build\iar\ke06
There has two master I2C code:I2C_MasterInt_demo and I2C_MasterPoll_demo.
I2C_MasterInt is the I2C interrupt code, I2C_MasterPoll is the polling code.
2. Know the I2C communication data which your sensor needed.
You can check your sensor datasheet, find the what I2C command, data it need, then use the KE06 as the I2C master to send these data, and get the according data from your sensor.
You can modify the code in the official KE drivers which I recommended you .
Wish it helps you!
If you still have question, please let me know!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------