![]() |
ArduSat API
|
Library for Arduino returns x,y,z data on current magnetic field. More...
#include <SAT_Mag.h>
Public Member Functions | |
SAT_Mag () | |
void | init (uint8_t node_id) |
void | configMag () |
int | readx () |
int | ready () |
int | readz () |
float | x_value () |
float | y_value () |
float | z_value () |
int | getHeading (float x, float y, float z) |
Library for Arduino returns x,y,z data on current magnetic field.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Designed for use with Freescale (C) MAG3110 Magnetometer
Tested with MAG3110 Breakout from Sparkfun and Arduino Uno
Based on Sparkfun's example for the MAG3110 breakout board: http://dlnmh9ip6v2uc.cloudfront.net/datasheets/BreakoutBoards/Mag3110_v10.pde
SAT_Mag::SAT_Mag | ( | ) |
Constructor that has a single ID parameter.
void SAT_Mag::configMag | ( | ) |
Initializes the magnetometer.
int SAT_Mag::getHeading | ( | float | x, |
float | y, | ||
float | z | ||
) |
void SAT_Mag::init | ( | uint8_t | node_id | ) |
Constructor that has a single ID parameter.
node_id | - The id of the user's arduino on the ArduSat. This allows the supervisor to know which arduino node to send the data back to. The id is assigned by NanoSatisfi. |
int SAT_Mag::readx | ( | ) |
Reads the x vector.
int SAT_Mag::ready | ( | ) |
Reads the y vector.
int SAT_Mag::readz | ( | ) |
Reads the z vector.
float SAT_Mag::x_value | ( | ) |
Reads the x offset value.
float SAT_Mag::y_value | ( | ) |
Reads the y offset value.
float SAT_Mag::z_value | ( | ) |
Reads the z offset value.