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.
Fork of MicroBitDALImageRewrite by
MicroBitMagnetometer.cpp
- Committer:
- finneyj
- Date:
- 2015-05-16
- Revision:
- 5:8bf639bbedb5
- Parent:
- 4:f998ee705a20
File content as of revision 5:8bf639bbedb5:
#include "inc/MicroBit.h" #include "inc/MicroBitMagnetometer.h" #include "inc/MicroBitMessageBus.h" /** * Constructor. * Create a magnetometer representation with the given ID. * @param id the ID of the new object. * @param address the I2C address of the device. */ MicroBitMagnetometer::MicroBitMagnetometer(int id, int address) { this->id = id; this->address = address; } /** * Gets the current heading of the device, relative to magnetic north. * @return the current heading, in degrees. */ int MicroBitMagnetometer::heading() { return 0; }