Sending Continuous Data to Mobile from STM32WB55 Nucleo over BLE
Hello Everyone,
I have been working in a project which reads a sensor data (Lets say an integer) continuously inside a while loop, something similar to following. I am using STM32WB55RG Nucleo Board with wireless connectivity.
void getReading(int *variable) {
while (1) { // Infinite loop
(*variable)++; // Increment the variable
if (*variable == 1000) { // Check if it reaches 1000
*variable = 0; // Reset to 0
//printf("Variable reset to 0\n");
} else {
//printf("Variable updated: %d\n", *variable);
}
}
}My goal is to send this sensor reading to a mobile phone over BLE, I followed the tutorial given in STM webpage to control a LED using STM BLE Toolbox application. However i am wondering how to modify that project to fulfill my requirement. It seems like the code being generated by CubeMx application is quite complex for a beginner and needs knowledge about sequencers and so on. Are there any simple method for this task? or How can I modify the BLE_Custom code generated by CubeMX for my application?
Thanks in Advance!!
