An fully working IMU-Filter and Sensor drivers for the 10DOF-Board over I2C. All in one simple class. Include, calibrate sensors, call read, get angles. (3D Visualisation code for Python also included) Sensors: L3G4200D, ADXL345, HMC5883, BMP085
PC/PC.h@4:f62337b907e5, 2013-08-29 (annotated)
- Committer:
- maetugr
- Date:
- Thu Aug 29 13:52:30 2013 +0000
- Revision:
- 4:f62337b907e5
- Parent:
- 0:3e7450f1a938
The Altitude Sensor is now implemented, it's really 10DOF now ;); TODO: Autocalibration
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
maetugr | 0:3e7450f1a938 | 1 | #include "mbed.h" |
maetugr | 0:3e7450f1a938 | 2 | |
maetugr | 0:3e7450f1a938 | 3 | #ifndef PC_H |
maetugr | 0:3e7450f1a938 | 4 | #define PC_H |
maetugr | 0:3e7450f1a938 | 5 | |
maetugr | 0:3e7450f1a938 | 6 | #define COMMAND_MAX_LENGHT 300 |
maetugr | 0:3e7450f1a938 | 7 | |
maetugr | 0:3e7450f1a938 | 8 | class PC : public Serial |
maetugr | 0:3e7450f1a938 | 9 | { |
maetugr | 0:3e7450f1a938 | 10 | public: |
maetugr | 0:3e7450f1a938 | 11 | PC(PinName tx, PinName rx, int baud); |
maetugr | 0:3e7450f1a938 | 12 | void cls(); // to clear the display |
maetugr | 0:3e7450f1a938 | 13 | void locate(int column, int row); // to relocate the cursor |
maetugr | 0:3e7450f1a938 | 14 | void readcommand(void (*executer)(char*)); // to read a char from the pc to the command string |
maetugr | 0:3e7450f1a938 | 15 | |
maetugr | 0:3e7450f1a938 | 16 | char command[COMMAND_MAX_LENGHT]; |
maetugr | 0:3e7450f1a938 | 17 | private: |
maetugr | 0:3e7450f1a938 | 18 | int command_char_count; |
maetugr | 0:3e7450f1a938 | 19 | }; |
maetugr | 0:3e7450f1a938 | 20 | #endif |