Using a HMC5883L compass

Hi everyone!

I have trouble understanding how to read values from a HMC5883L compass. I've searched the Internet, but all codes that I tried didn"t work.

Also, the HMC5883L library I downloaded doesn't work.

Does anyone have a code for this or can anyone help me in any way?

Juststarted:
I have trouble understanding how to read values from a HMC5883L compass. I've searched the Internet, but all codes that I tried didn't work.

Also, the HMC5883L library I downloaded doesn't work.

Strains credulity.
How about more details on your compass module and what you've tried - don't make people dig it out of you. The Word for Today is: forthcoming.

If type Arduino HMC5883Linto google you'll be swamped, deluged, with examples galore.

Did you install the required pullup resistors? Many modules do not have them on board and if they are not there the user is responsible for their installation. A 4.7K from SDA to Vcc and a 4.7K from SCL to Vcc.