Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: X_NUCLEO_IKS01A1-f255a2c75ecb mbed-rtos mbed
sensor.h
- Committer:
- nlsantos
- Date:
- 2016-05-15
- Revision:
- 10:2f9585ff5a7b
- Parent:
- 7:ed4a10ebe720
- Child:
- 11:f80f5c4a2db9
File content as of revision 10:2f9585ff5a7b:
#ifndef EXPANSIONBOARD_H #define EXPANSIONBOARD_H #include "rtos.h" #include "log.h" #include "x_nucleo_iks01a1.h" #include <vector> using std::vector; #define QUEUESIZE 120 /* Instantiate the expansion board */ static X_NUCLEO_IKS01A1 *mems_expansion_board = X_NUCLEO_IKS01A1::Instance(D14, D15); static GyroSensor *gyroscope = mems_expansion_board->GetGyroscope(); static MotionSensor *accelerometer = mems_expansion_board->GetAccelerometer(); static MagneticSensor *magnetometer = mems_expansion_board->magnetometer; static HumiditySensor *humidity_sensor = mems_expansion_board->ht_sensor; static PressureSensor *pressure_sensor = mems_expansion_board->pt_sensor; static TempSensor *temp_sensor = mems_expansion_board->ht_sensor; class ExpansionBoard { public: ExpansionBoard(vector<log_data> vector, int num); static void sampleData(); static void getData(const void*); static Mail<log_data, QUEUESIZE> mail_box; static char *ExpansionBoard::printDouble(char* str, double v, int decimalDigits); float T; //Default sampling rate, specified in specs static vector<log_data> * v; static int * n; bool flag; static bool loggingFlag; }; #endif