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.
Fork of i2c scanner by
Diff: SensorBoards.h
- Revision:
- 1:22bad558be6c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/SensorBoards.h Sat Sep 09 10:50:12 2017 +0000
@@ -0,0 +1,28 @@
+#ifndef _SENSORBOARDS_H
+#define _SENSORBOARDS_H
+#include "mbed.h"
+
+#define SENSOR_NUMBERS 0xA1
+#define SENSORS_IDS 0xA2
+#define SENSOR_READINGS 0xA3
+
+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);
+private:
+ Board boards[1];
+};
+
+#endif
\ No newline at end of file
