Skip to content

Commit

Permalink
Merge pull request #126 from adkl/rainbowhat-readme-update
Browse files Browse the repository at this point in the history
rainbowhat - Update README.md
  • Loading branch information
Dave Smith authored Aug 15, 2019
2 parents aa3209b + 03aff30 commit 331beda
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rainbowhat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ public boolean onKeyUp(int keyCode, KeyEvent event) {

```java
// Continuously report temperature.

// Register the sensor somewhere in your Activity initialization code
Bmx280SensorDriver temperatureSensorDriver = new Bmx280SensorDriver("I2C1");
temperatureSensorDriver.registerTemperatureSensor();

// Now you can register the sensor callback for continously report temperature
final SensorManager sensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
sensorManager.registerDynamicSensorCallback(new SensorManager.DynamicSensorCallback() {
@Override
Expand Down

0 comments on commit 331beda

Please sign in to comment.