Thingy91 External Sensor Configuration

I tried to enable the configuration of Thingy91 to use external sensors. I made following additions:

1. Added the following line to Asset_tracker_V2/K config file : rsource "src/ext_sensors/Kconfig"

Tried following methods:

Method1. to enable EXTERNAL_SENSORS by default made changes to  src/ext_sensors/Kconfig file : 

      menuconfig EXTERNAL_SENSORS
      bool "External sensors"
      default y -> this was not there in original code 

then, Project-> Reload, Project-> RUN CMAKE .. the compile and Build is successful, but the CONFIGUR_EXTERNAL_SENSORS remains unhighlighted in sensor_module.c

Method 2: in prj.conf 

CONFIG_EXTERNAL_SENSORS = y

there is compile error: try to set value y of  undefined CONFIG_EXTERNAL_SENSORS.

How to enable the external sensors in Thingy91

  • I added CONFIG_EXTERNAL_SENSORS=y to \nrf\applications\asset_tracker_v2\prj.conf (NCS v1.9.0) and built the sample using thingy91_nrf9160_ns and it built without problems. Try removing the spaces before and after '='.

    By the way, the config CONFIG_EXTERNAL_SENSORS should be set to y automatically if using the board thingy91_nrf9160_ns due to this statement: https://github.com/nrfconnect/sdk-nrf/blob/f3c28f3e30762285af4541ec5bad7b5015471bd8/applications/asset_tracker_v2/src/modules/Kconfig.sensor_module#L9. I just built the asset tracker v2 (untouched NCS v1.9.0) and saw that CONFIG_EXTERNAL_SENSORS=y in \nrf\applications\asset_tracker_v2\build_thingy91ns\zephyr\.config

    What NCS version are you using?

    Can you check the .config file and see if CONFIG_EXTERNAL_SENSORS is set?

    then, Project-> Reload, Project-> RUN CMAKE .. the compile and Build is successful, but the CONFIGUR_EXTERNAL_SENSORS remains unhighlighted in sensor_module.c

    Maybe there is a bug with the IDE, can you try add something like this:

    #if defined(CONFIG_EXTERNAL_SENSORS)
    #error "CONFIG_EXTERNAL_SENSORS is set"
    #endif

    and check the build output and see if it's set

    Best regards,

    Simon

Related