code c of HM5883

good morning I want a code C for reading and writing of i2c for the HM5883 sensor. best regards

--------------------------------------- Posted through

formatting link

Reply to
didaSofi
Loading thread data ...

I doubt you'll get a good answer on this, for several reasons:

1: This is an FPGA group, and yours is an embedded programming question -- at least, doing it in 'C' implies that you'll be running the thing on a processor. 2: Code like that is highly specific to the processor and the peripheral, so you'd need to luck out with someone who's done it and can share -- and you didn't say what your processor is. 3: Code like that is also highly specific to the problem to be solved, unless someone really went all out to make generic code. 4: If you know what you're doing, it usually takes less time to write code like that than it takes to use someone else's. If you don't know what you're doing, then someone else's code won't help you.

This sounds harsh, but I think you need to either learn how to do the work yourself, or you need to hire someone to do it for you -- and if you hire, given the level of competence implied by your question, you probably want to hire someone to do the WHOLE project, for reason 4 stated above.

The only halfway point that I can see in this is if you own a business and want to hire someone to both do the work and teach you, or if you're a trusted employee and your boss is willing to hire someone to do the work and teach you (which will cost him more the one time, and less in the future if you're trainable and loyal).

If you DO decide to do the work, and want help doing it, then try posting a question on comp.arch.embedded (which you can do via embeddedrelated.com). Give it a title like "Interfacing to an I2C Sensor", and a first line like "I need to interface an XXX processor to a HM5883 YYY (gyro, accel, temperature -- whatever it is) sensor from ZZZ (i.e. -- what company?). I've never done I2C before and I'm lost". Don't expect someone to do your work for you -- expect people to helpfully point your way. If you're polite and humble, someone will help you.

--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com
Reply to
Tim Wescott

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.