Using the Wire Librarly, I'm trying to write to an address, then read the data back from the same address. I then would like to print the contents on the serial port. This is for the HMC6352 compass, but i'm just trying to understand the general structure. I'm fairly new to Arduino and programming. I read through many examples, but they were doing something slightly different.
Can someone give me an example in simple form of a: write, read then print a value from 1 address?
I have tried the Wire.send, Wire.receive .requestFrom, .available. but get confused if you need to use all these commands and why you can't just send, receive then print.