Sensor interfacing

Hi everyone,

I want to interface Triple-Axis Magnetometer/Compass Sensor(HMC5883L) with electric_imp002. I could not find any support in the Hardware Drivers Documentation for this particular sensor.How do I go about?

In general I wanted to know ,how to go about interfacing any sensor ,which is not there in the hardware drivers list.

Following is the link ,for interfacing HMC5883L with Arduino(supported by Adafruit):


That would be the i2c interface …

You could also purchase the luminosity sensor from Adafruit and follow the example they show. That would probably be enough to figure out the HMC5883L, and learn about i2c.

To @mlseim’s comments I’ll just add a link to our Developer Guide ‘Porting Arduino code to the imp’, which has lots of advice on converting an Arduino library like the one you mention to an imp class.