Skip to content

Handle floats from within library #12

@brentru

Description

@brentru

Adafruit IO displays floats with 6 precision points by default.

To reduce this, you could do something in code.py to truncate the value such as:
temperature = '%0.2f'%(temperature)

send_data could be enhanced by adding an optional precision kwarg which would modify the data to include N precision points, before assembling the json payload.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions