Skip to content

Commit

Permalink
Use period characteristic to set accelerometer period
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-robert committed Oct 24, 2024
1 parent be721e6 commit 4cff789
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/accelerometer-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ export class AccelerometerService implements Service {
const dataView = new DataView(new ArrayBuffer(2));
dataView.setUint16(0, value, true);
return this.queueGattOperation(() =>
this.accelerometerDataCharacteristic.writeValueWithoutResponse(dataView),
this.accelerometerPeriodCharacteristic.writeValueWithoutResponse(
dataView,
),
);
}

Expand Down

0 comments on commit 4cff789

Please sign in to comment.