Arduino
Arduino copied to clipboard
Documentation for Wire.requestFrom incorrect. The function returns a value.
The documentation for Wire.requestFrom states that the function returns "none", as documented here:
http://arduino.cc/en/Reference/WireRequestFrom
However in fact it returns the number of bytes obtained from the slave:
uint8_t TwoWire::requestFrom(uint8_t address, uint8_t quantity, uint8_t sendStop)
Please correct the web page to avoid further confusion.
The page was amended to read:
Returns
int : the number of bytes returned from the slave device
However it returns an unsigned 8-bit integer, that is, uint8_t (usually called the "byte" type).
Thank for the clarification, I was running and gunning when I updated that page.