|
@@ -1,5 +1,25 @@
|
1
|
1
|
UPM - Sensor/Actuator repository for Maa
|
2
|
2
|
|
3
|
|
-UPM is a high level repository for sensors that use maa.
|
|
3
|
+UPM is a high level repository for sensors that use maa. Each sensor links to
|
|
4
|
+libmaa and are not meant to be interlinked although some groups of sensors may
|
|
5
|
+be. Each sensor contains a header which allows to interface with it. Typically
|
|
6
|
+a sensor is represented as a class and instanciated.
|
|
7
|
+
|
|
8
|
+The constructor is expected to initialise the sensor and paramters may be used
|
|
9
|
+to provide identification/pin location on the board.
|
|
10
|
+
|
|
11
|
+Typically an update() function will be called in order to get new data from the
|
|
12
|
+sensor in order to reduce load when doing multiple reads to sensor data.
|
|
13
|
+
|
|
14
|
+A basic sensor is expected to work as such:
|
|
15
|
+s = new sensor();
|
|
16
|
+print(sensor->read());
|
|
17
|
+sleep(1);
|
|
18
|
+s->update();
|
|
19
|
+print(sensor->read();
|
|
20
|
+
|
|
21
|
+However implementation and API design is compeltely up to the developer, some
|
|
22
|
+enumerable sensors for example may provide much clever instanciation. Displays
|
|
23
|
+may also create more complex structures in order to interface with them.
|
4
|
24
|
|
5
|
25
|
For more information on maa, see the maa README
|