Jump to content

microbit.accelerometer.setPeriod

From Compy Docs

Attempts to set the sample rate of the accelerometer to the given millisecond period. If the requested rate is not available on the hardware, the next lowest rate will be selected.

Function

Synopsis

microbit.accelerometer.setPeriod(period)

Arguments

  • `period` — The new period (in milliseconds) between samples.

Returns

A boolean value. True on success.

See Also