I am using Arduino Mega 2560. I am trying to interface two sensors. A GSM 900a sensor I am using adafruit Fona library to send sms using this module and other is a co2 sensor using another serial software. Both uses serial librari I have connected to pins 50 and 51 for 1 sensor and 52 and 53 for other sensor. I need to know how to use both these sensors simultaneously. I am able to use one sensor at a time. Both should run parallel because the data from the sensor should be messaged thru GSM module.
Kindly help regarding how to simultaneously use them in parallel