{
  "id": "solderedelectronics/Soldered-BMA400-MicroPython-Library",
  "name": "Soldered-BMA400-MicroPython-Library",
  "prettyName": "Soldered-BMA400-MicroPython-Library",
  "description": "MicroPython library for the BMA400 accelerometer breakout board",
  "version": "",
  "author": "solderedelectronics",
  "license": "GPL-3.0",
  "tags": [],
  "status": "VALID",
  "official": false,
  "source": "https://github.com/solderedelectronics/Soldered-BMA400-MicroPython-Library",
  "updatedAt": "2026-09-17T10:30:18.166Z",
  "page": "https://checkmim.com/packages/solderedelectronics+Soldered-BMA400-MicroPython-Library",
  "createdAt": "2026-09-17T10:30:15.329Z",
  "submittedBy": "SolderedElectronics",
  "install": {
    "mpremote": "mpremote mip install github:solderedelectronics/Soldered-BMA400-MicroPython-Library",
    "mip": "import mip; mip.install(\"github:solderedelectronics/Soldered-BMA400-MicroPython-Library\")"
  },
  "readme": "# Soldered BMA400 Accelerometer MicroPython Library\n\n| ![Soldered BMA400 Accelerometer breakout](TODO_PRODUCT_IMAGE_URL) |\n| :-----------------------------------------------------------------------------------------------: |\n|                          [Soldered BMA400 Accelerometer breakout](https://www.solde.red/333419)                     |\n\n<!-- TODO: product not released yet (SKU 333419), swap the image URL above once the listing is live -->\n\nBreakout board for the Bosch BMA400 ultra-low-power triaxial accelerometer, drawing as little as 14 µA in normal mode. It measures 3-axis acceleration across four selectable ranges (±2g to ±16g) at up to 800 Hz, and includes on-chip step counting, tap detection, orientation and activity-change recognition, and a FIFO buffer. The board communicates over I2C only and is part of the [Qwiic ecosystem](https://soldered.com/collections/qwiic-ecosystem).\n\n### Quick start\n\n```python\nfrom bma400 import BMA400, BMA400_OK\nimport time\n\nsensor = BMA400()  # Or BMA400(address=BMA400_I2C_ADDRESS_SDO_HIGH)\n\nwhile True:\n    if sensor.get_sensor_data() == BMA400_OK:\n        print(sensor.data.accel_x, sensor.data.accel_y, sensor.data.accel_z)\n    time.sleep(1)\n```\n\nHave a look at the scripts in `Examples/` for basic readings, motion detection and the built-in step counter.\n\n### How to install\n\nUse [mim](https://checkmim.com/packages).\n\nor\n\nAfter [**installing the mpremote package**](https://docs.micropython.org/en/latest/reference/mpremote.html), install the library on your board using the following command:\n\n```sh\n  mpremote mip install github:SolderedElectronics/Soldered-BMA400-MicroPython-Library\n```\nOr, if you're running a Windows OS:\n\n```sh\n  python -m mpremote mip install github:SolderedElectronics/Soldered-BMA400-MicroPython-Library\n```\n\n### Repository Contents\n\n- **bma400.py** - MicroPython driver class, I2C only\n- **package.json** - mip install manifest\n- **/Examples** - examples for basic readings, motion detection and the built-in step counter\n\n### Examples\n\n| Example | What it does |\n| :------ | :----------- |\n| `bma400-basicReadings.py` | Reads X, Y, Z acceleration in a loop, the mode most applications want |\n| `bma400-motionDetection.py` | Configures the generic interrupt feature and reacts to it on a hardware interrupt pin |\n| `bma400-stepCounter.py` | Uses the built-in step counter and activity type detection (running/walking/still) |\n\n### Hardware design\n\nYou can find hardware design for this board in _Soldered BMA400 Accelerometer breakout_ hardware repository.\n\n### Documentation\n\nAccess library documentation [here](https://docs.soldered.com/).\n\n### About Soldered\n\n![Soldered Logo](https://raw.githubusercontent.com/SolderedElectronics/Soldered-Generic-Arduino-Library/dev/extras/Soldered-logo-color.png)\n\nAt Soldered, we design and manufacture a wide selection of electronic products to help you turn your ideas into acts and bring you one step closer to your final project. Our products are intented for makers and crafted in-house by our experienced team in Osijek, Croatia. We believe that sharing is a crucial element for improvement and innovation, and we work hard to stay connected with all our makers regardless of their skill or experience level. Therefore, all our products are open-source. Finally, we always have your back. If you face any problem concerning either your shopping experience or your electronics project, our team will help you deal with it, offering efficient customer service and cost-free technical support anytime. Some of those might be useful for you:\n\n- [Web Store](https://www.soldered.com/shop)\n- [Tutorials & Projects](https://soldered.com/learn)\n- [Documentation](https://docs.soldered.com)\n\n### Original source\n\nThis library is a port of the [Soldered BMA400 Arduino library](https://github.com/SolderedElectronics/Soldered-BMA400-Arduino-Library), which wraps [SparkFun's BMA400 Arduino Library](https://github.com/sparkfun/SparkFun_BMA400_Arduino_Library), itself built on the [BMA400 Sensor API](https://github.com/BoschSensortec/BMA400-Sensor-API) by Bosch Sensortec. Thank you, SparkFun and Bosch Sensortec.\n\n### Open-source license\n\nSoldered invests vast amounts of time into hardware & software for these products, which are all open-source. Please support future development by buying one of our products.\n\nCheck license details in the LICENSE file. Long story short, use these open-source files for any purpose you want to, as long as you apply the same open-source licence to it and disclose the original source. No warranty - all designs in this repository are distributed in the hope that they will be useful, but without any warranty. They are provided \"AS IS\", therefore without warranty of any kind, either expressed or implied. The entire quality and performance of what you do with the contents of this repository are your responsibility. In no event, Soldered (TAVU) will be liable for your damages, losses, including any general, special, incidental or consequential damage arising out of the use or inability to use the contents of this repository.\n\n## Have fun!\n\nAnd thank you from your fellow makers at Soldered Electronics.\n"
}