This is my quadcopter prototype software, still in development!

Committer:
Anaesthetix
Date:
Tue Jul 23 14:01:42 2013 +0000
Revision:
1:ac68f0368a77
Parent:
0:978110f7f027
Other accelerometer added

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Anaesthetix 0:978110f7f027 1 #ifndef BMA180_SPI
Anaesthetix 0:978110f7f027 2 #define BMA180_SPI
Anaesthetix 0:978110f7f027 3
Anaesthetix 0:978110f7f027 4 #include "mbed.h"
Anaesthetix 0:978110f7f027 5
Anaesthetix 0:978110f7f027 6 class BMA180 {
Anaesthetix 0:978110f7f027 7 public:
Anaesthetix 0:978110f7f027 8 BMA180(SPI& spi, PinName cs);
Anaesthetix 0:978110f7f027 9 char write(char address,char data);
Anaesthetix 0:978110f7f027 10 char read(char address);
Anaesthetix 0:978110f7f027 11 void readX(void);
Anaesthetix 0:978110f7f027 12 void readY(void);
Anaesthetix 0:978110f7f027 13 void readZ(void);
Anaesthetix 0:978110f7f027 14 void softReset(void);
Anaesthetix 0:978110f7f027 15 void init(void);
Anaesthetix 0:978110f7f027 16 void range(int r);
Anaesthetix 0:978110f7f027 17 void bw(int r);
Anaesthetix 0:978110f7f027 18 void readRaw(void);
Anaesthetix 0:978110f7f027 19 float x,y,z ;
Anaesthetix 0:978110f7f027 20 int xi,yi,zi;
Anaesthetix 0:978110f7f027 21 char data[6];
Anaesthetix 0:978110f7f027 22 private:
Anaesthetix 0:978110f7f027 23 SPI& _spi;
Anaesthetix 0:978110f7f027 24 DigitalOut _cs;
Anaesthetix 0:978110f7f027 25
Anaesthetix 0:978110f7f027 26 };
Anaesthetix 0:978110f7f027 27
Anaesthetix 0:978110f7f027 28 #endif