Skip to content

Add a destructor that tries to make the sensor sleep #11

@romintomasetti

Description

@romintomasetti

It would be nice to have a destructor for the SDS011 class. The simplest I can think of is:

def __del__(self):
    self.sleep()

If for any reason the script crashes, the sensor will be safely shut down.

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