Multiple Devices on I2C Bus and DAC

I am currently working on a project to build a DAC with Arduino Uno.
I have MCP4725(DAC) and MCP9808(Digital temperature sensor). They both are I2C interfaced slave modules, and I know that I can connect these two modules to A4(SDA), A5(SCL) on Uno simultaneously as they have different addresses.

What I am trying to do is to convert digital signal/data from MCP9808 to an analogue signal display on the screen or an oscilloscope. However, I am not sure whether it is possible to receive the data from MCP9808 and write these data on MCP4725 to convert these data to an analogue signal. I have the code for MCP9808 which is attached with the post.
I don’t see why it can’t do that because Uno will retrieve the data and write these data to MCP4725 to cover it.

Could someone help me out on this, please!

Thank you.

MCP9808_Sketch.ino (495 Bytes)

Adafruit provides a library for the MCP4725 and it's available in the Arduino IDE under "Manage Libraries.." (Sketch->Include Library), just search for 4725. Just call setVoltage() on that object to set the analog output.

Thank you for your reply. However, I am not sure with how to receive the data from MCP9808 and use that data to DAC. Could you possibly help me out with coding?

Thank you.

Could you possibly help me out with coding?

It doesn't work that way. Try it to implement yourself and post your code if you experience problems.