Rapid IoT Weather Station demo and ENS210 temperature+humidity sensor

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Rapid IoT Weather Station demo and ENS210 temperature+humidity sensor

1,249 Views
vilem
Contributor III

I am studying the Rapid IoT Weather Station demo provided in the Online IDE (Studio) and I am not getting the magic behind retrieving values from ENS210 temperature and humidity sensor. The sensor is triggered by interval and gets two "tasks":

  1. Read (measure) temperature
  2. Read (measure) humidity

1.PNG

Once the humidity is measured it sets the value of Humidity Characteristics (sends the humidity number over BLE): 

3.PNG

But it uses the same trigger (Humidity Read) to connect to Temperature Characteristics. How does it pass the temperature number to it? Especially when there is no Set Value event?

2.PNG

Analogically here:

6.PNG

I would expect to have something like this in the "temperature stream":

4.PNG

Nevertheless if I update the flow according to the picture above it immediatelly affects the "humidity stream":

5.PNG

What am I missing?

Labels (1)
0 Kudos
Reply
1 Reply

1,060 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi,

What am I missing?

No, you are right, you are not missing anything.

But it uses the same trigger (Humidity Read) to connect to Temperature Characteristics. How does it pass the temperature number to it? Especially when there is no Set Value event?

The sensor is using the same trigger as you mentioned, and also the same set value event, 

If you look into the code, the trigger is for the temp and the humidity.

  case ATMO_ABILITY(ENS210TemperatureHumidity, trigger):
  {
   ATMO_Value_t ENS210TemperatureHumidity_Value;
   ATMO_InitValue(&ENS210TemperatureHumidity_Value);
   ENS210TemperatureHumidity_trigger(value, &ENS210TemperatureHumidity_Value);
   ATMO_TriggerHandler(ATMO_TRIGGER(ENS210TemperatureHumidity, triggered), &ENS210TemperatureHumidity_Value);
   ATMO_FreeValue(&ENS210TemperatureHumidity_Value);
   break;
  }

Regards,

Mario

0 Kudos
Reply