cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55RC: Implement ADC acquisiton data code in BLE custom app code to transmit datas

SPasq.2
Associate

Hello, 

I am working with a 64 core board and STM32WB55RC microcontroller on a bachelor's thesis. The idea is to acquire data from an analog accelerometer (x,y,z) and two distance sensors also analog with differential values (ADC differential) and send them via BLE to a windows desktop application in Visual Studio (C#) for use and display in an existing GUI.

Now step by step I configured a custom Wpan_32 network from STM32CubeMX by implementing two services (Accelerometer and Distance) in the form of notification with each having its own UUID. The device is visible from the bluetooth scan and the connection works. I also developed a piece of code in VisualStudio that can detect, connect, and find services of the bluetooth network. My question now is about where and how to implement the ADC conversion code for the data I acquire in the custom_app.c file to be able to send it constantly. I know that I have to use the function "Custom_Acceleration_data_Send_Notification(void); and Custom_Acceleration_data_Update_Char(void);" (in this case already renamed to my code) but I don't know how to implement the code to transmit the data. I was thinking of doing the transmission via UART but it is definitely possible via I2c or SPI as well.

The main problem is that I don't know the correct syntax and function where to enter this data.

Would anyone be able to help me? Thank u!

0 REPLIES 0