Hi @Chia Li Greetings! Thank you for posting the question on this forum.
Send the reading Azure RTOS and the thread will handle the rest (This part I am really unsure how it works)
The answer to this question lies in the Prepare the device section of the Tutorial you have mentioned in your question. Once you created an IoT Central Application and added a device following the steps outlined in the article, you would be able to capture the credentials needed for establishing a connection to this device. Step 7 of the Create a new device section shows the details need to configure the connection with your SMT32 device. Please refer the below image for reference.
Once you capture the ID scope, Device ID and the Primary Key details, you can provide them in the getting-started\STMicroelectronics\B-L475E-IOT01A\app\azure_config.h
file. The SDK will utilize these settings from the code through STMicroelectronics/B-L475E-IOT01A/app/nx_client.c
and establish the connection to the device.
I would recommend testing the sensors independent of IoT Central and come up with a code that successfully works on STM32. Once you have this code working, try to embed it into the file getting-started/STMicroelectronics/B-L475E-IOT01A/app/nx_client.c
. This file contains the methods that are responsible for pushing telemetry data on to Azure IoT Central. You can modify the code to capture the sensors data and publish it on to the device.
Hope this answers your question. Please let me know if you have any additional questions or need further assistance.
Converting this to comment for further discussion!