Global Onewire

I am currently instantiating my onewire object at the start of my script with

OneWire oneWire(5); DallasTemperature sensors(&oneWire);

I would like to put this in my setup, however I lose scope of the object as it is not available anywhere else. I am not sure how to globalize this object when I instantiate it within the setup.

I would like to put this in my setup

Why?

I am not sure how to globalize this object when I instantiate it within the setup.

Again, why not simply declare it as a global variable, if that is what you are trying to end up with?

I may not want to conditionally, I have another device in the circuit that is not one wire that I may want to read.

I have another device in the circuit that is not one wire that I may want to read.

??

I'm not following here, what does this other device have to do with the 1-wire device, and why can't you just declare the 1-wire stuff outside a function to make it global?


Rob