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
Diff: sensor.h
- Revision:
- 0:1eaebb55408a
- Child:
- 2:0b8065489409
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sensor.h Fri May 13 18:03:08 2016 +0000 @@ -0,0 +1,37 @@ +#ifndef EXPANSIONBOARD_H +#define EXPANSIONBOARD_H +#include "rtos.h" +#include "log.h" +#include "x_nucleo_iks01a1.h" + +#define QUEUESIZE 120 + +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_sensor1 = mems_expansion_board->ht_sensor; +static TempSensor *temp_sensor2 = mems_expansion_board->pt_sensor; + +class ExpansionBoard +{ + uint8_t id; + +public: + ExpansionBoard(); + Mail<Log, QUEUESIZE> mail_box; + int front; + int back; + float T; + void readData(); + void stopSampling(); + void startSampling(); + bool isEmpty(); + int size(); + bool isFull(); +}; + +#endif \ No newline at end of file