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

How do I add extra sensors to the mesh sensor example?

Hi,

I am trying to add a temperature sensor to the sensors I can query on the sensor server example.

I have updated a few things

The present ambient temperature property id is 0x4F.

I also updated the status callback

Whenever I query the sensor server using the property ID for temperature, the callback is never ran, only when I query the motion sense property.

How do I add sensors properly?

Parents
  • Hi Eric, 

    As far as I know, you also need to add the AMBIENT_TEMPERATURE into sensor_initialize() similar  to SENSOR_MOTION_SENSED_PROPERTY_ID 

    Also you need to modify range_vector_bytes_get() and delta_vector_bytes_get() to add AMBIENT_TEMPERATURE range so that cadence_new won't return error. 

    After that you should be able to catch the get status in main.c . Don't forget to increase cadence_timer_ids and min_interval_timer_ids. 

Reply
  • Hi Eric, 

    As far as I know, you also need to add the AMBIENT_TEMPERATURE into sensor_initialize() similar  to SENSOR_MOTION_SENSED_PROPERTY_ID 

    Also you need to modify range_vector_bytes_get() and delta_vector_bytes_get() to add AMBIENT_TEMPERATURE range so that cadence_new won't return error. 

    After that you should be able to catch the get status in main.c . Don't forget to increase cadence_timer_ids and min_interval_timer_ids. 

Children
No Data
Related