Last change
on this file since 394 was 136, checked in by ertl-honda, 9 years ago |
ライブラリとOS及びベーシックなサンプルの追加.
|
File size:
353 bytes
|
Rev | Line | |
---|
[136] | 1 | #ifndef Compass_h
|
---|
| 2 | #define Compass_h
|
---|
| 3 |
|
---|
| 4 | #if ARDUINO >= 100
|
---|
| 5 | #include "Arduino.h"
|
---|
| 6 | #else
|
---|
| 7 | #include "WProgram.h"
|
---|
| 8 | #endif
|
---|
| 9 |
|
---|
| 10 | //0x21==0x42>>1, from bildr's code
|
---|
| 11 | #define HMC6352SlaveAddress 0x21
|
---|
| 12 | #define HMC6352ReadAddress 0x41
|
---|
| 13 |
|
---|
| 14 | class Compass{
|
---|
| 15 | public:
|
---|
| 16 | void begin();
|
---|
| 17 | float getReading();
|
---|
| 18 | private:
|
---|
| 19 | void _beginTransmission();
|
---|
| 20 | void _endTransmission();
|
---|
| 21 |
|
---|
| 22 | };
|
---|
| 23 |
|
---|
| 24 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.