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-18
- Revision:
- 29:464097268aaf
- Parent:
- 27:1216b002cbf3
- Child:
- 31:8bbdfea60151
File content as of revision 29:464097268aaf:
#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 that will store the log information class ExpansionBoard { public: ExpansionBoard(vector<log_data> vector, int num, bool lFlag); static void sampleData(); static void getData(const void*); static Queue<log_data, QUEUESIZE> queue; 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; static bool flag; }; #endif