Hello everyone,
could you please help me , because I don’t know how to send a integer with the Wire library ?
Have a look at the documentation, there are examples
See this one
Sending an int is just writing multiple bytes (the sizeof your int) and you can use Wire.send(data, quantity)
Receiving needs to be a bit different, you need to know the size of your int and as you will receive that byte by byte you'll need to arrange that in your int variable using bitshifting and Bitwise operations
igortomic97:
Hello everyone,
could you please help me , because I don't know how to send a integer with the Wire library ?
byte and char are both integer data types. You probably meant. "int".