diff --git a/samples/sensor/dht_polling/README.rst b/samples/sensor/dht_polling/README.rst index 09550b255d0..b985c9e0a08 100644 --- a/samples/sensor/dht_polling/README.rst +++ b/samples/sensor/dht_polling/README.rst @@ -23,7 +23,17 @@ be aliased as ``dhtN`` where ``N`` goes from ``0`` to ``9``. For example: }; }; -Make sure the aliases are in devicetree, then build and run with: + +Make sure the aliases are in devicetree. + +It also requires a correct fixture setup when the sensor is present. +For the correct execution of that sample in twister, add into boards's +map-file next fixture settings:: + + - fixture: fixture_i2c_hs300x + + +Then build and run with: .. zephyr-app-commands:: :zephyr-app: samples/sensor/dht_polling diff --git a/samples/sensor/dht_polling/sample.yaml b/samples/sensor/dht_polling/sample.yaml index 8177e636d21..50cf2ef6d7c 100644 --- a/samples/sensor/dht_polling/sample.yaml +++ b/samples/sensor/dht_polling/sample.yaml @@ -15,6 +15,7 @@ tests: - nucleo_f401re harness: console harness_config: + fixture: fixture_i2c_hs300x type: one_line regex: - "[0-9A-Za-z_,+-.]*@[0-9A-Fa-f]*: temp is (.*) °C humidity is (.*) %RH"