Acceleration

Get the acceleration value (milli g-force), in one of three specified dimensions.

Find the acceleration of the Calliope mini (how fast it is speeding up or slowing down).

input.acceleration(Dimension.X);

You measure acceleration with the milli-g, which is 1/1000 of a g. A g is as much acceleration as you get from Earth’s gravity.

Parameters

Returns

Example: bar chart

This example shows the acceleration of the Calliope mini with a bar graph.

basic.forever(() => {
    led.plotBarGraph(input.acceleration(Dimension.X), 1023)
})

See also

set accelerometer range, compass heading, light level

Edit this page on GitHub