I have downloaded a sketch that uses SPI. The sketch includes the Wire library but at compilation time, I am getting errors that TwoWire doesn't have methods called send()
and receive()
?
1 Answer 1
This is caused by the sketch you downloaded being old. In prior releases, the methods called send()
and receive()
were used to send and receive SPI data. These were renamed to be write()
and read()
. If you change your code where there are references to Wire.send()
and change to Wire.write()
and also change Wire.receive()
to Wire.read()
, you should find that your applications compile and run correctly.