Skip to content

Improvement: Add a public getRawData() function #179

@leowatts

Description

@leowatts

I am currently doing a project with an ESP32 where I need to store and transmit data over the internet from a DHT22, it would be nice to be able to use the 4-byte raw data from the sensor, as that is a smaller size that unnecessarily storing the floats. I propose a public function that simply allows a programmer to read the raw data of the sensor. Something like:

const byte* getRawData() const { return data; }

The programmer would be responsible for calling read() prior to this (or I suppose it could be integrated into the function and a nullptr returned if it fails).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions