ArduSat API
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
SAT_Accel.h
Go to the documentation of this file.
1 #ifndef SAT_ACCEL_H
2 #define SAT_ACCEL_H
3 
4 #define CS 10
5 #define POWER_CTL (0x2D) //Power Control Register
6 #define DATA_FORMAT (0x31)
7 #define DATAX0 (0x32) //X-Axis Data 0
8 #define DATAX1 (0x33) //X-Axis Data 1
9 #define DATAY0 (0x34) //Y-Axis Data 0
10 #define DATAY1 (0x35) //Y-Axis Data 1
11 #define DATAZ0 (0x36) //Z-Axis Data 0
12 #define DATAZ1 (0x37) //Z-Axis Data 1
13 
14 #include <Arduino.h>
15 
16 class SAT_Accel {
17 public:
18  SAT_Accel();
19  void populateValues(int &x, int &y, int &z);
20 private:
21  char values[10];
22  void writeRegister(char registerAddress, char value);
23  void readRegister(char registerAddress, int numBytes, char * values);
24 };
25 
26 #endif /* SAT_ACCEL_H */