Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting temperature data #493

Open
WSPluta opened this issue Jul 19, 2022 · 0 comments
Open

getting temperature data #493

WSPluta opened this issue Jul 19, 2022 · 0 comments

Comments

@WSPluta
Copy link

WSPluta commented Jul 19, 2022

I been trying to modify the code as I dont seem to have the temp being captured when I run things52.py --temperature

if I run with

        if args.temperature:
            thingy.environment.enable()
            thingy.environment.configure(temp_int=1000)
            thingy.environment.set_temperature_notification(True)

all i get is

Connected...
LED set to breathe mode...
Enabling selected sensors...
All requested sensors and notifications are enabled...

as a test I modified it to:

        if args.temperature:
            thingy.environment.enable()
            thingy.battery.enable()
            thingy.environment.configure(temp_int=1000)
            thingy.environment.set_temperature_notification(True)
            print("Battery: ", thingy.battery.read())

and now Im getting

Connected...
LED set to breathe mode...
Enabling selected sensors...
Notification: Temp received:  33.5 degCelsius
Battery:  40
All requested sensors and notifications are enabled...

why is that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant