Skip to content

Commit

Permalink
Write example code for logging
Browse files Browse the repository at this point in the history
  • Loading branch information
parksb committed Nov 15, 2023
1 parent a17a6a7 commit 55a6925
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class MainActivity: AppCompatActivity(), SensorEventListener {
override fun onSensorChanged(event: SensorEvent) {
if (event.sensor.type == Sensor.TYPE_ACCELEROMETER) {
val (x, y, z) = event.values
Log.i(this::class.java.simpleName, "$x, $y, $z")
}
}

Expand Down Expand Up @@ -122,6 +123,7 @@ class MainActivity: AppCompatActivity(), SensorEventListener {
override fun onSensorChanged(event: SensorEvent) {
if (event.sensor.type == Sensor.TYPE_ACCELEROMETER) {
val (x, y, z) = event.values
- Log.i(this::class.java.simpleName, "$x, $y, $z")
+ zap.send(ZapAccelerometer(x, y, z))
}
}
Expand Down

0 comments on commit 55a6925

Please sign in to comment.