Example Code for Raspberry Pi-prepare interrupt function

Last revision 2026/01/21

Prepare the data ready interrupt function for the BMM150 sensor on Raspberry Pi.

Hardware Preparation

Software Preparation

Wiring Diagram

Connect the module with Raspberry Pi as shown below. Default address: 0x13.

Connection Raspberry Pi

Other Preparation Work

  1. Enable Raspberry Pi I2C (follow steps in previous example).
  2. Install dependencies (follow steps in previous example).
  3. Download the library (follow steps in previous example).
  4. Navigate to the sample code directory:
    • cd DFRobot_BMM150/python/raspberrypi/examples/data_ready_interrupt

Sample Code

Open the terminal and enter the following commands to run the sample code:

cd DFRobot_BMM150/python/raspberrypi/examples
cd data_ready_interrupt
python data_ready_interrupt.py.py

Result

Sample 3

Was this article helpful?

TOP