Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
hmc5583l.h
00001 00002 #pragma once 00003 00004 #include "mbed.h" 00005 00006 struct coord{ 00007 int x; 00008 int y; 00009 int z; 00010 }; 00011 00012 class HMC5583L{ 00013 public: 00014 HMC5583L(PinName sda, PinName scl, int address = 0x3D); 00015 HMC5583L(I2C &i2c, int address = 0x3D); 00016 00017 coord getCompass(); 00018 00019 protected: 00020 int address; 00021 I2C i2c; 00022 00023 int regToInt(char msb, char lsb); 00024 00025 private: 00026 void initialize(); 00027 00028 };
Generated on Tue Jul 12 2022 15:14:26 by
1.7.2