Hi,
One wire reading seem to use interrupts. and conflicts with a scheduled interrupt i am using (currently using timer 2 for timed interrupt and timer 0 for millis() value).
one wire reading seem to interfere with timer0. as i have a routine that execute many times without the millis() (from timer 0) value changing. My routine on timer 2 does not execute properly either.
i can't find wich timer is used, and how to make the one wire sensor work with the timed interrupt i am using.
I am currently working with nano Board.
i can have :
readings of one wire correctly if i am not using interrupts
timed interrupt working properly if no reading is done on the one wire sensors.
can someone help me about using theses 3 items together
Please, write in text the sequence of events that take place in your project. This is to identify the true cause of problem by comparing with your codes.
Looking at the OneWire library, there are multiple places in the code where interrupts are temporarily disabled, that may be causing your problems.
Unrelated to interrupts, reading the temperature from the sensor is by default a blocking function in the DallasTemperature library. This can cause a delay of up to 750mS. The library contains methods to avoid this.
The data sheet for the temperature sensor has documentation on the delay, it varies with the number of bits of precision in the temperature reading.
As far as the code, the library has a couple of example sketches confusingly named WaitForConversion showing how to initiate the temperature sampling, then read the value after the appropriate time interval.