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
00001 #ifndef EXPANSIONBOARD_H 00002 #define EXPANSIONBOARD_H 00003 00004 #include "rtos.h" 00005 #include "x_nucleo_iks01a1.h" 00006 #include <vector> 00007 00008 using std::vector; 00009 00010 #define QUEUESIZE 120 00011 00012 /* Instantiate the expansion board */ 00013 static X_NUCLEO_IKS01A1 *mems_expansion_board = X_NUCLEO_IKS01A1::Instance(D14, D15); 00014 00015 static GyroSensor *gyroscope = mems_expansion_board->GetGyroscope(); 00016 static MotionSensor *accelerometer = mems_expansion_board->GetAccelerometer(); 00017 static MagneticSensor *magnetometer = mems_expansion_board->magnetometer; 00018 static HumiditySensor *humidity_sensor = mems_expansion_board->ht_sensor; 00019 static PressureSensor *pressure_sensor = mems_expansion_board->pt_sensor; 00020 static TempSensor *temp_sensor = mems_expansion_board->ht_sensor; 00021 00022 00023 // Class that will store the log information 00024 class ExpansionBoard 00025 { 00026 public: 00027 ExpansionBoard(int num, bool lFlag); 00028 static void sampleData(); 00029 static void getData(const void*); 00030 //static Queue<log_data, QUEUESIZE> queue; 00031 static char *ExpansionBoard::printDouble(char* str, double v, int decimalDigits); 00032 float T; //Default sampling rate, specified in specs 00033 //static vector<log_data> v; 00034 static int * n; 00035 static bool flag; 00036 }; 00037 00038 #endif
Generated on Fri Jul 15 2022 17:35:06 by
1.7.2
