Skip to content

Compile error due to type parameters I2C #19

@RobTillaart

Description

@RobTillaart

See - https://forum.arduino.cc/t/sparkfun-apds-9960-gesturetest-on-avery-compile-error/1360155/13

The library has two places where it uses Wire.requestFrom() in the .cpp file

line 2193 - Wire.requestFrom(APDS9960_I2C_ADDR, 1);
line 2221 - Wire.requestFrom(APDS9960_I2C_ADDR, len);

Fix is to cast the parameters to the same type e.g. (uint8_t)

line 2193 - Wire.requestFrom((uint8_t) APDS9960_I2C_ADDR, (uint8_t) 1);
line 2221 - Wire.requestFrom((uint8_t) APDS9960_I2C_ADDR, (uint8_t) len);

Thanks for your time,
Rob

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions