Need HELP about setting two modes in arduino

I am trying to make a system which shows the altimeter, temperature and air pressure. I have all the necessary components but I cannot measure altitude and air pressure at the same time because in the void setup() section I need to change the “myPressure.setModeAltimeter();” code with “myPressure.setModeBarometer();” . I want to combine the two mode in one so that I can show all the results on the lcd without compiling again. Thanks for your help in advance. :slight_smile:

Are you using your own code, or somebody else's code?

Look at the demo several things at a time and, if appropriate, this demo for merging Arduino programs.