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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.