Skip to content

Compile error due to type parameters I2C #19

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions