This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

I2c pin connections on nrf9160-DK

In the nrfConnect SDK I can see just one example for a I2C sensor - BH1749

I want to modify this for other I2C sensors.

However the README does not explain how to make the connections.  The nrf9160 datasheet does not seem to help much.

Can you suggest which pins to use and how to modify the configuration files.

For an initial test I'd like to use a BME280 in I2C mode.

Thx.

Parents Reply
  • Thx Carl

    I found ../ncs/zephyr/samples/sensor/bme280 in the SDK.

    Then added nrf9160dk_nrf9160ns.overlay in the boards folder:

    ```

    &i2c0 {
      bme280@77 {
        compatible = "bosch,bme280";
        reg = <0x77>;
        label = "BME280";
      };
    };

    ```

    When trying to build this I get 

    ```

    error: #error Your devicetree has no enabled nodes with compatible "bosch,bme280"

    ```

    I don't understand how to check that the following is valid for nrf9160dk

    ```

    BME280 Board
    SCL P0.31 
    SDA  P0.30 
    GND GND
    VIN VDD

    ```

    Regards.

    PS. Being that the DK has two Nordic chips on it, please note that I want to do this with the 9160 without using the nRF52840.  The DK board has pins labelled PO.30 and PO.31 but it's not clear how these are connected.

Children
Related