BMM150_HelloWorld Christian Dupaty 03/2021 Library and demo for BMM150 see datasheet here : https://www.bosch-sensortec.com/products/motion-sensors/magnetometers-bmm150/ Adaptation of BOSCH driver https://github.com/BoschSensortec/BMM150-Sensor-API for ARM MBED and tested on NUCLEO-L073RZ and GEOMAGNETIC CLICK https://www.mikroe.com/geomagnetic-click
Dependencies: mbed bmm150GeoMagnetic
BMM150_HelloWorld
Christian Dupaty 03/2021
Library and demo for BMM150 see datasheet here : https://www.bosch-sensortec.com/products/motion-sensors/magnetometers-bmm150/
Adaptation of BOSCH driver https://github.com/BoschSensortec/BMM150-Sensor-API for ARM MBED and tested on NUCLEO-L073RZ and GEOMAGNETIC CLICK https://www.mikroe.com/geomagnetic-click
The BMM150 sensor supports I2C and SPI serial communications. The choice of protocol is made on the PS pin (see datasheet page 32), the default mode is SPI. Unfortunately, MIKROE did not place a configuration micro-switch on the GeoMagnetic-click module, but straps that are difficult to move. By default, the module is configured in SPI mode (all the straps are on the left as in the photo). To place the module in I2C mode, all the straps must be moved to the right.
However, it is possible to implement I2C communications without moving all the straps:
- Move only the strap at the bottom on the photo to the right. - On the left connector we have now :
- CS is connected to CSB-BMM150
- SCK is connected to SCL-I2C-BMM150
- MISO is linked to SDO-BMM150
- MOSI is connected to SDA-I2C-BMM150
BMM150 DataSheet page 36, CSB and SDO are used to define the I2C address. In the program, this address is chosen in BMM150_defs.h line 37 (here address 0x13, therefore CSB = 1 and SDO = 1) define BMM150_I2C_Address (0x13 << 1)
SCL and SDA lines must be connected to 3.3v by pullup resistor (4.4K to 10K) to comply with the I2C standard
Supply with the NUCLEO card in 3.3v and GND
The heading is given periocally by UART over USB in an ASCII terminal (ex TeraTerm)
Video here ... https://photos.app.goo.gl/zqKQNfw5694xbMZCA
Changes
Revision | Date | Who | Commit message |
---|---|---|---|
8:a268ea639af1 | 2021-05-20 | cdupaty | OK with library updated |
7:82dd77013b34 | 2021-05-20 | cdupaty | OK; |
6:c9c788d429f9 | 2021-05-20 | cdupaty | tested OK |
5:a809f6690d18 | 2021-05-05 | cdupaty | demo OK; |
4:577548612451 | 2021-03-25 | cdupaty | New i2c_ functions |
3:caca5cdad681 | 2021-03-24 | cdupaty | Christian Dupaty 03/2021; Library and demo for BMM150 see datasheet here : https://www.bosch-sensortec.com/products/motion-sensors/magnetometers-bmm150/; Adaptation of BOSCH driver https://github.com/BoschSensortec/BMM150-Sensor-API; for ARM MBED and test... |
2:4ddfbf5b65b2 | 2016-04-30 | cdupaty | Test? pour projet BTSSN |
1:67f60f68719f | 2010-11-27 | aberk | Uses libraries for imports (as opposed to programs). |
0:f9a9be860001 | 2010-08-26 | aberk | (none) |