mixing more than one sensor in Arduino ?

I have a 1-wire Dallas sensor running right now on my Arduino UNO and it works pretty well. I send the signal to the Pi over USB serial Cable and process the signal there with Python, I log the temperature to a file and append a date with some logic that was written to process the signal.

I wanted to buy a different I2C sensor to measure CO2, some come built-in with another temperature sensor, which is good because that would give me a second temperature sensor of the air, the Dallas measures water temperature.

The question is, can I mix an I2C sensor with the Dallas sensor ? how does that work in the C code ?

Thanks!

They can both be connected.

The Dallas 1-wire sensore (I assume it's a DS18B20 or simular) is not an I2C sensor. So you need for the DS18B20 an other pin than for your I2C devices. The DS18B20 and the I2C devices can not share the lib or pins.

But you can easily include libs for the DS18B20 and your second, third ... sensor in the same sketch.