SparkFun Mini Human Presence and Motion Sensor - STHS34PF80 (Qwiic)

Hi

Just trying to run SparkFun Mini Human Presence and Motion Sensor - STHS34PF80 (Qwiic)

applied arduino sketch on arduino uno got error :Example1_BasicReadings:64:21: error: invalid operands of types ‘void’ and ‘int’ to binary ‘operator==’

if(Wire.begin() == 0)


exit status 1

invalid operands of types 'void' and 'int' to binary 'operator=='

What is going on ?

In the code it is checking that a value ‘0’ is returned, but Wire.begin() is defined as a ‘void’, this means it will NOT return a value.

To get around the error just do Wire.begin(); without a check.

Thank you very much

Best Regards