2025-04-20 6:17 PM
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.
Solved! Go to Solution.
2025-04-24 12:54 AM
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).
Yann
2025-04-22 2:33 AM
Hi @KKKK9 ,
you can find a description of the params in the user guide, page 37.
It's important to understand that the approach state is active only if the user is above the WakeUpDistance.
Let me know if you can enter in approach state with these conditions.
Yann
2025-04-23 12:51 AM
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
2025-04-24 12:54 AM
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).
Yann
2025-04-24 5:20 PM
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