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.
https://electricimp.com/docs/libraries/hardware/

Following is the link ,for interfacing HMC5883L with Arduino(supported by Adafruit):https://learn.adafruit.com/adafruit-hmc5883l-breakout-triple-axis-magnetometer-compass-sensor?view=all

Regards

That would be the i2c interface …
https://electricimp.com/docs/resources/i2c/

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.