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

Continuously report temperature - No sensor reported #103

Open
paul-matthews opened this issue May 18, 2018 · 3 comments
Open

Continuously report temperature - No sensor reported #103

paul-matthews opened this issue May 18, 2018 · 3 comments

Comments

@paul-matthews
Copy link

Using the code snippet for Continuously reporting temperature sensor, no ambient temperature sensor is connected. However reading a single temperature value works fine. Is this library registering the driver for the Bmx280 on the board, because the sample doesn't cover it.

Repro steps:

  1. Copy code snippet into onCreate.
  2. Run activity on a Pi 3 (with working other functions)

Expected:

  1. Observe logging of temperature sensor

Actual:

  1. Observed logging only includes: "I/SensorManager: DYNS Register dynamic sensor callback"
  • No events triggered into the SensorEventListener instance

On further inspection (attempting to use the getDefaultSensor() ) no sensors exist.

@jdkoren
Copy link
Member

jdkoren commented May 18, 2018

It seems the snippet you linked to is missing a call to registerTemperatureSensor(). For now, please refer to the Activity code in the Bmx280 driver sample, which demonstrates the same use case.

@plattysoft
Copy link

Maybe a duplicate? #102

@jdkoren
Copy link
Member

jdkoren commented May 21, 2018

@plattysoft Not quite a duplicate (at least I don't think so), I think @paul-matthews issue is the code snippet is missing a call to registerTemperatureSensor(), so the sensor never actually becomes available.

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

3 participants