source: rtos_arduino/trunk/arduino_lib/libraries/LuckyShield/src/lib/MAG3110.h@ 175

Last change on this file since 175 was 175, checked in by ertl-honda, 8 years ago

ライブラリを Arduino IDE 1.7.9 にupdate

File size: 617 bytes
Line 
1/*
2mag3110.h
3libary for using the I2C mag3110 magnetometer
4
5(c) Written by Jeroen Cappaert for NanoSatisfi, August 2012
6
7 - 21 Mar. 2016
8 Library modified to work with Arduino Lucky Shield
9 by andrea[at]arduino[dot]org
10
11*/
12
13#ifndef MAG3110_h
14#define MAG3110_h
15
16#include <Arduino.h>
17
18
19// define magnetometer I2C address (fixed)
20
21#define MAG_ADDR 0x0E // Magnetometer MAG3110
22
23
24class MAG3110
25{
26 public:
27 MAG3110();
28 void begin();
29 int readx();
30 int ready();
31 int readz();
32
33 int x(){return readx();};
34 int y(){return ready();};
35 int z(){return readz();};
36 private:
37};
38
39extern MAG3110 mag3110;
40
41#endif
Note: See TracBrowser for help on using the repository browser.