Skip to main content
Associate II
April 21, 2025
Solved

SPD Library (Raspberry Pi Pico): Where Can I Find Full Params_t Parameter Descriptions?

  • April 21, 2025
  • 2 replies
  • 566 views

Hello,

I am currently working on integrating the Smart Presence Detection (SPD) library on a Raspberry Pi Pico.
Using the programming guide, I have managed to run the SPD algorithm, but I cannot get the “Approach” state to be detected correctly— it switches to “Presence” almost immediately.

I believe the key is to tune the parameters contained in the Params_t structure, but I have not been able to find detailed explanations for each field.

Could you please let me know where I can find a complete description of every parameter in Params_t, or any document that explains their effect on the algorithm?

Thank you for your support.

Best answer by labussiy

Hi @KKKK9 ,

Technically, all the Params_t parameters are accessible by the user, but we recommend to adjust only the documented ones (see my previous message or the User Guide).

spd_params.png

Yann 

2 replies

Technical Moderator
April 22, 2025

Hi @KKKK9 ,

you can find a description of the params in the user guide, page 37.

spd_params.png

 

 

 

 

 

 

It's important to understand that the approach state is active only if the user is above the WakeUpDistance.

wakeonstop.png

 

 

 

 

 

 

Let me know if you can enter in approach state with these conditions.

Yann 

KKKK9Author
Associate II
April 23, 2025

Hi Yann,

Thank you again for your support.

I found that the issue was on my side — I mistakenly initialized the SPD library with SPD_Init(0) instead of SPD_Init(1). After correcting this, the Approach state is now detected properly.

I have another question regarding parameter tuning.
In the SmartPresenceDetectionKit_F401_1.0.0 package, I found the Params_t structure defined in the sensor_command.h file. Are all of these parameters adjustable by the user to optimize detection behavior?
Or are there any parameters that should generally remain at their default values to ensure stable operation of the SPD algorithm?

I would appreciate your guidance on which parameters are safe or recommended to modify.

Best regards,

KKKK9

labussiyBest answer
Technical Moderator
April 24, 2025

Hi @KKKK9 ,

Technically, all the Params_t parameters are accessible by the user, but we recommend to adjust only the documented ones (see my previous message or the User Guide).

spd_params.png

Yann 

KKKK9Author
Associate II
April 25, 2025

Hi Yann,

Thank you for the clarification!

I’ll focus on adjusting the documented parameters as recommended to ensure stable performance. That really helps to know.

I’ll continue testing and tuning based on this. If any other questions come up along the way, I’ll reach out again.

Thanks again for your support!

Best regards,

KKKK9