code
Dependencies: MPU6050_SIM5320_TEST SDFileSystem WakeUp
Fork of Nucleo_L476RG_SDCard_WorkingSample by
Diff: SensorBoards.h
- Revision:
- 1:d5774258d18b
- Child:
- 2:f745f2656606
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SensorBoards.h Sat Sep 09 14:36:17 2017 +0000 @@ -0,0 +1,33 @@ +#ifndef _SENSORBOARDS_H +#define _SENSORBOARDS_H +#include "mbed.h" + +#define SENSOR_NUMBERS 0xA1 +#define SENSORS_IDS 0xA2 +#define SENSOR_READINGS 0xA3 +#define Device_Name_ADDR (0xEE) // Device You Wish to Use Address - using i2c Address +#define WRITE (0x00) // i2c Write bit +#define READ (0x01) // i2c Read bit + + +struct Board +{ + uint8_t I2CAddress; + uint8_t sensorIDs[8]; + uint8_t numberOfSensors; +}; + +class SensorBoards +{ +public: + uint8_t sensorBoardScanner(); + uint8_t sensorIDScanner(); + uint8_t getSensorNumbers(uint8_t address); + uint8_t getSensorIDs(uint8_t address, uint8_t *IDBuffer); + void getSensorReadings(uint8_t address, uint8_t ID, uint8_t* IDMeasure); + uint8_t returnBoardAdd(); +private: + Board boards[1]; +}; + +#endif \ No newline at end of file