Skip to content

BH1750 reporting -10924 #520

Description

@user2684
No description provided.

Activity

  1. Bottesford commented on Apr 4, 2021

    @Bottesford

    This is due to the use of INT in the SensorBH1750 class. When values are too high they go negative.
    I fixed mine by changing :
    new Child(this,INT,nodeManager.getAvailableChildId(child_id),S_LIGHT_LEVEL,V_LEVEL,_name);
    to:
    new Child(this,FLOAT,nodeManager.getAvailableChildId(child_id),S_LIGHT_LEVEL,V_LEVEL,_name);

    and:
    int value = _lightSensor->readLightLevel();
    to:
    float value = _lightSensor->readLightLevel();

  2. user2684 commented on Apr 12, 2021

    @user2684
    ContributorAuthor

    Thanks a lot for the advice, will apply the same approach in the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions