General

SEN0521 Compilation error in Arduino IDE

userHead Hans-Jürgen.Habel 2026-04-04 01:03:48 928 Views2 Replies

SEN0521 Arduino IDE

 

I get an error during compilation, can someone help me?

I use the Github Robbike/DFRobot_Microwave_Radar_Module 
 

C:\SEN0521_radar_measurement\examples\DFRobot_Microwave_Radar_Module.cpp: In member function 'bool DFRobot_Microwave_Radar_Module::readDone()':
C:\SEN0521_radar_measurement\examples\DFRobot_Microwave_Radar_Module.cpp:86:30: error: ordered comparison of pointer with integer zero ('char*' and 'int')
  86 |     if (strstr(Data, "Done") > 0) {
     |         ~~~~~~~~~~~~~~~~~~~~~^~~
exit status 1

Compilation error: ordered comparison of pointer with integer zero ('char*' and 'int')

2026-04-06 13:16:05

Hey, you can fix the compile error with this simple change!

 

In DFRobot_Microwave_Radar_Module.cpp line 86,

 

just replace if (strstr(Data, "Done") > 0) with if (strstr(Data, "Done") != NULL).

 

Save the file and recompile, it’ll work right away!

userHeadPic Yx
Hans-Jürgen.Habel wrote:

Thank you 

2026-04-07 17:40:59
1 Replies