1

I would like to know how to influence the polling frequency of a device on the w1-gpio module.

The reason is because I have a DS18B20 temperature sensor on a Raspi that reads too hot.

The first thing I thought I'd try, is to reduce the frequency of reading it out, as it warms itself up when read out too often. (Link)

Edit: I have since determined that is is indeed read out continuously, multiple times per second, using monitor.py as was kindly suggested below. From my application, I only read once per 15 seconds.

I have used the code found in various places to read it out. (Link)

I've been unable to find documentation that helps me understand this.

1 Answer 1

1

As far as I can tell the module provides no mechanism to vary the frequency of polling.

I suspect you are wasting your time in thinking that the polling rate is an issue in the temperature reading.

I believe the polling rate to be in the tens of seconds. If you want to find out the exact time then monitor the 1-wire GPIO with something like piscope or run monitor.py.

The module you linked to is not the official driver. What makes you think it is relevant to your Raspberry Pi usage?

1
  • Thank you for the useful pointers! To answer your last question: I'm probably looking at the wrong documentation, so I removed that link. However, the polling rate can not be in the tens of seconds as I notice temperature changes when I hold the sensor within seconds.
    – Amateur
    Commented Aug 25, 2020 at 7:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.