2022-09-09 01:05 AM
Hello everyone,
Situation: Currently, I am trying to intergrate BME688 to the board Nucleo-WL55JC1. To be specific, on the board, I downloaded and ran the LoRaWAN_End_Node example. Then, instead of obtaining temperature/humidity/pressure from a function from the example (I assumed the original data obtaining function is EnvSensors_Read(&sensor_data) in lora_app.c), I want to use the sensor BME688 to give me those measurement.
What I did: I initialized the BME688 sensor as well as set up some constrains for it after the MX_LoRaWAN_Init(). Then I set the BME688 data obtaining process as a function and register it as a task. The task has an equal priority as the SendTxData() function.
Result: the program stopped right at the first measurement.
Question:
P/s: this post related to this post (https://community.st.com/s/feed/0D53W00001n9fiGSAQ).
I attached main.c and lora_app.c below.
I hope to have your opinions on this question.
Thank you, Huy Nguyen.
2022-09-12 02:38 AM
Hello @Community member
In my opinion, if you want to create a new task, add a new entry under CFG_SEQ_Task_Id_t with a new name in Inc/utility_def.h.
If you just need to retreive data from you sensor, then you may just need to call RetrieveBMEData() under SendTxData(), no ?
If you want only that code to be called at regular interval, you can use UTIL_TIMER_Create()
BR,
Bruno
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2022-10-04 01:31 AM
Sorry for replying late. Your second suggestion helped me to finish the task.
Thank you very much, Huy Nguyen.