3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

nRF52840でBME280を使う場合のDevice Tree定義

Last updated at Posted at 2019-10-05

Zephyrで /zephyr/samples/sensor/bme280 (I2C接続) 使う場合、 /zephyr/boards/arm/nrf52840_pca10056/nrf52840_pca10056.dts に直接書くか、zephyr/samples/sensor/bme280/nrf52840_pca10056.overlayに定義する。

&i2c0 {
  compatible = "nordic,nrf-twi";
  status = "okay";
  sda-pin = <26>;
  scl-pin = <27>;

  bme280@76 {
    compatible = "bosch,bme280";
    reg = <0x76>;
    label = "BME280";
  };
};

以下のコマンドでビルドする

west build -b nrf52840_pca10056 zephyr/samples/sensor/bme280
3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?