Interfacing with TWO k30 CO2 sensors

James_M:
The procedure for changing the address involves running some code to change the address information stored in the sensor EEPROM and RAM. Jason posted the code (in this thread, above)to do this using the Arduino but I'm not sure if I've gotten it to work.

The first thing you need to do is to get the second sensor working, by itself, at the alternate address. Otherwise, you won't be able to share any transmit or receive pins.

James_M:
What would I have to change in the code to use two different Rx pins, right now the softwareSerial library get initialized like this:

SoftwareSerial K_30_Serial(12,13); //Sets up a virtual serial port

//Using pin 12 for Rx and pin 13 for Tx




Would I add a second line right after that read like this?



SoftwareSerial K_30_Serial(11,13);

James_M:
At this point I'm wondering if it wouldn't be easier to sidestep the whole problem and adapt the TwoPortRecieve Arduino example to poll each sensor separately, then perhaps it wouldn't matter that the sensor addresses are the same?

If you used 4 pins in total (2 for each sensor), then it wouldn't matter if the sensor addresses are the same. You might be able to share the receive pin using this arrangement, although I still suspect you will need some sort of hardware gate.