
code
Dependencies: MPU6050_SIM5320_TEST SDFileSystem WakeUp
Fork of Nucleo_L476RG_SDCard_WorkingSample by
SensorBoards.h
00001 #ifndef _SENSORBOARDS_H 00002 #define _SENSORBOARDS_H 00003 #include "mbed.h" 00004 00005 #define SENSOR_NUMBERS 0xA1 00006 #define SENSORS_IDS 0xA2 00007 #define SENSOR_READINGS 0xA3 00008 #define Device_Name_ADDR (0xEE) // Device You Wish to Use Address - using i2c Address 00009 #define WRITE (0x00) // i2c Write bit 00010 #define READ (0x01) // i2c Read bit 00011 00012 00013 struct Board 00014 { 00015 uint8_t I2CAddress; 00016 uint8_t sensorIDs[8]; 00017 uint8_t numberOfSensors; 00018 }; 00019 00020 class SensorBoards 00021 { 00022 public: 00023 SensorBoards() : numberOfBoards(0) {} 00024 uint8_t sensorBoardScanner(); 00025 uint8_t sensorIDScanner(); 00026 uint8_t getSensorNumbers(); 00027 uint8_t getSensorIDs(); 00028 void getSensorReadings(uint8_t address, uint8_t ID, uint8_t *IDMeasure); 00029 uint8_t returnBoardAdd(); 00030 //private: 00031 Board boards[8]; 00032 int numberOfBoards; 00033 }; 00034 00035 #endif
Generated on Wed Dec 19 2018 21:19:16 by
