-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMPL115A2.h
More file actions
36 lines (29 loc) · 685 Bytes
/
Copy pathMPL115A2.h
File metadata and controls
36 lines (29 loc) · 685 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
MPL115A2 Sensor Library for Arduino
created by R.N <zan73722@gmail.com>
2011-01-16 Created.
2011-10-06 Compatibility with Arduino 1.0 <www.misenso.com>
*/
#ifndef MPL115A2_H
#define MPL115A2_H
//http://dsscircuits.com/articles/arduino-i2c-master-library.html
#include "I2C.h"
#include <inttypes.h>
class MPL115A2Class
{
private:
int m_shdnPin;
int m_bShutdown;
int m_i2c_address;
signed int sia0, sib1, sib2, sic12, sic11, sic22;
unsigned int uiPadc, uiTadc;
public:
MPL115A2Class(const int shdnPin = 9);
void begin();
void shutdown();
void ReadSensor();
float GetPressure();
float GetTemperature();
};
extern MPL115A2Class MPL115A2;
#endif