Interfacing with TWO k30 CO2 sensors

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.

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);

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?

1 Like