cancel
Showing results for 
Search instead for 
Did you mean: 

Hey everybody, is it possible to convert code for the STM32F103C8T6 so it works on the NUCLEO F446RE? Or can I just use the same code and use in STM32CubeMX?

FEnis.1
Associate

I'm trying to do a Project with the MAX30102. I can read out the raw data of the sensor but I am unable to understand the algorithm to calculate the Heartrate and SPO2 out of the raw data. The only examples I can find are for Arduino Boards but that's not useful at all. I found this one Example for the STM32F103C8T6 and I was hoping I could just convert it for my board so at least I got something that works...

Here is the link for the example:

https://www.programmersought.com/article/90827305857/

I have the code in the attachment.

I hope somebody can help me.

best regards,

F.Enis

4 REPLIES 4
KevinA
Senior

Nice find but I see two problems:

  1. You didn't copy max30102.h (no big)
  2. This project was created with MDK-ARM V5 as the tool chain.

How this will impact you if you don't use the KEIL compiler tool chain I have no idea

You should just use F466RE in Cube and try it! If you don't have the MAX30102 yet Adafruit has one and Mouser many - Mouser has the MAX Feather shield with the device.

;)

FYI MAX has a repository on mbed with this device and mbed has the Nuleco-F446RE supported.

FEnis.1
Associate

Thanks for the reply.

The problem is that I tried it but can't get anything to work.

I found this website: https://morf.lv/implementing-pulse-oximeter-using-max30100

The author is doing the processing for the MAX30100 but the same principles should apply for the MAX30102. The problem is that I have problems converting the code he used for my Project. I am not that good at programming to be honest:grinning_face_with_sweat:.

I have my main file in the attachment. Maybe somebody could help me a little because I'm already really frustrated:o)

best regards,

F.Enis

Shreyu1001
Associate II

hey did u get ur output working?

 

From 3 years ago, try it yourself..

Read the data sheet. F1 and F4 are architecturally different. The HAL provides for a rough equivalence, and should be relatively fungible.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..