Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor DS18B20 Temperature Conversion Time Handling #1824

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on May 26, 2023

  1. Refactor DS18B20 Temperature Conversion Time Handling

    Currently, the DS18B20 driver uses a fixed delay of 1 millisecond (board.io.sendOneWireDelay(pin, 1);) after requesting each sensor to perform a temperature conversion. However, the DS18B20 datasheet specifies that a conversion actually takes up to 750 milliseconds.
    
    This misalignment could potentially lead to inaccuracies when reading from multiple DS18B20 sensors simultaneously, particularly if the requested frequency (options.freq) is shorter than the time required for a temperature conversion. Additionally, it's important to note that the implementation of the delayTask function on the Firmata side is not fully functional and relies on the inclusion of a "FirmataScheduler" module, which merely adds processor cycles and does not provide a true delay mechanism.
    
    rwaldron#1823
    echavet committed May 26, 2023
    Configuration menu
    Copy the full SHA
    a2943e3 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2023

  1. Update tests thermometer.js

    Support for changes to the DS18B20 Thermometer Driver: 
    - Removed the test for the call to `sendOneWireDelay` as it is no longer necessary.
    - Modified the delays to account for the 750ms delay.
    echavet committed May 27, 2023
    Configuration menu
    Copy the full SHA
    dc9092e View commit details
    Browse the repository at this point in the history