user-1: I've been told 2 by a friend but this looks to only use one?
https://www.adafruit.com/product/1746

user4143: It is I2C so 2 pins.
Optionally it can use a third pin to indicate data ready.

user10394: It depends what you think of as a pin.
You have VIn and Gnd, SCL and SDA are the 4 main pins you will need to connect.  The 3.3V and RDY pin don't seem to be connected in any of the pics I can see.
So the answer is 2 pins plus 2 power.
Oh from the page on how to use it, https://learn.adafruit.com/adafruit-hmc5883l-breakout-triple-axis-magnetometer-compass-sensor/wiring-and-test:
"This 3-axis magnetometer breakout is thankfully very easy to use. It only requires 2 power pins and 2 data pins."
Interestingly it doesn't appear to use pull up resistors, which most I2C device require, so the might be built into the board.

user29796: Below image is the answer to your question.

According to this image, magnetometer required four pins of arduino.
GND of magnetometer ----> Arduino GND
Vcc of magnetometer ----> Arduino 3.3 Volt
SDA of magnetometer ----> Arduino Analog Pin 4
SCL of magnetometer ----> Arduino Analog Pin 5
A4, A5 on Uno are SDA, SCL, required for hardware-based I2C.
I hope it will help you.

-1: <p>I've been told 2 by a friend but this looks to only use one?</p>

<p><a href="https://www.adafruit.com/product/1746" rel="nofollow noreferrer">https://www.adafruit.com/product/1746</a></p>
 4143: <p>It is I2C so 2 pins.</p>

<p>Optionally it can use a third pin to indicate data ready.</p>
 10394: <p>It depends what you think of as a pin.</p>

<p>You have VIn and Gnd, SCL and SDA are the 4 main pins you will need to connect.  The 3.3V and RDY pin don't seem to be connected in any of the pics I can see.</p>

<p>So the answer is 2 pins plus 2 power.</p>

<p>Oh from the page on how to use it, <a href="https://learn.adafruit.com/adafruit-hmc5883l-breakout-triple-axis-magnetometer-compass-sensor/wiring-and-test" rel="nofollow noreferrer">https://learn.adafruit.com/adafruit-hmc5883l-breakout-triple-axis-magnetometer-compass-sensor/wiring-and-test</a>:
"This 3-axis magnetometer breakout is thankfully very easy to use. It only requires 2 power pins and 2 data pins."</p>

<p>Interestingly it doesn't appear to use pull up resistors, which most I2C device require, so the might be built into the board.</p>
 29796: <p>Below image is the answer to your question.</p>

<p><a href="https://i.stack.imgur.com/ipvPy.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ipvPy.png" alt="Conncetion"></a></p>

<p>According to this image, magnetometer required four pins of arduino.</p>

<p>GND of magnetometer ----> Arduino GND</p>

<p>Vcc of magnetometer ----> Arduino 3.3 Volt</p>

<p>SDA of magnetometer ----> Arduino Analog Pin 4</p>

<p>SCL of magnetometer ----> Arduino Analog Pin 5</p>

<p>A4, A5 on Uno are SDA, SCL, required for hardware-based I2C.</p>

<p>I hope it will help you.</p>
