Wire.requestFrom(mcp1_address, 1) compiler warning

Status
Not open for further replies.

rfresh737

Well-known member
I'm getting a compiler warning from my line: Wire.requestFrom(mcp1_address, 1); // request one byte

Here is the actual warning:

Code:
C:\Users\rfresh1011\Documents\FS1000_2017\FS1000MCP23017PortExpanderV5\FS1000MCP23017PortExpanderV5.ino:229:35:
warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:

Wire.requestFrom(mcp1_address, 1); // request one byte

For some reason the compiler doesn't like the numeric 1 argument (position 35 on the line). Does it want a var here instead of a numeric 1 or 5 or 10?

Thank you...

Full sketch attached.
 

Attachments

  • FS1000MCP23017PortExpanderV5.ino
    16 KB · Views: 63
Try "1U" for specifying it's an unsigned type?
Also, which Wire library is this? I2C_T3 is commented out of your sketch

mcp1_address must be of uint8_t type as well
 
You're right Michael. My apologies to you and the forum. I was working on a different sketch didn't make the connection.
 
Status
Not open for further replies.
Back
Top