Skip to content

HX711 not thread safe? #257

@andreash-esp

Description

@andreash-esp

Hi,

while diagnosing some rare fluations during initialisation I noticed these happen because i set up the scale in my setup() funktion and then spawn a task on core 0 to continously read the weight.

The issue can easily be triggered by reading scale.get_units from the main thread (running on core 1) and a second thread doing the same on core 0. This results in fluctuations and very slow reads from the HX711.

A valid answer might be "don't do that then", but does this observation make sense from the code point of view?

Kind Regards
Andreas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions