Bosch BM222

Github Repo C Header C source JS source
mongoose-os-libs/bm222 mgos_bm222.h   api_bm222.js


This is a library for the Bosch BM222 accelerometer. See for more information about the hardware.

BM222 accelerometer API.

See for more information.



BM222.init(bus, addr)

Initialize BM222 sensor on a given I2C bus and addr. Returns true on success, false otherwise.

Read sensor values given I2C bus and addr. In case of success, returns array of 3 integers: x, y, z. Otherwise returns null.

edit this doc