Skip to content

Wire.requestFrom() differences AVR / SAMD #4329

@extrapixel

Description

@extrapixel

Repeated calls to beginTransmission()/ write() / endTransmission() / requestFrom() behaves differently on AVR and SAM. I think they should either:

  • behave the same
    or
  • be documented properly

On UNO:
Wire.requestFrom(XxXX, n);
if the received data is shorter than 'n' or not all data is read via Wire.read(), the Wire.available() buffer is empty in the next iteration.

on ZERO
Wire.requestFrom(XxXX, n);
if the received data is shorter than 'n' or not all data is read via Wire.read(), the Wire.available() buffer is not empty, but padded with '0' characters up to 32 bytes and these stay in the buffer even in the next iteration

(same for IDE 1.6.6 and 1.6.8 hourly 2015/12/21 04:13 )

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions