• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

cmake/22-Nov-2023-703613

docs/22-Nov-2023-1,096912

doxy/22-Nov-2023-9,1416,831

examples/22-Nov-2023-32,90114,223

src/22-Nov-2023-61,12129,503

.clang-formatD22-Nov-20233.2 KiB12386

.gitignoreD22-Nov-202377 1411

.travis.ymlD22-Nov-2023853 1817

Android.mkD22-Nov-20231.5 KiB4312

CMakeLists.txtD22-Nov-20238.5 KiB199177

LICENSED22-Nov-20231 KiB2117

README.mdD22-Nov-20233.8 KiB11174

README.md

1UPM (Useful Packages & Modules) Sensor/Actuator repository for MRAA
2==============
3
4UPM is a high level repository for sensors that use MRAA. Each sensor links
5to MRAA and are not meant to be interlinked although some groups of sensors
6may be. Each sensor contains a header which allows to interface with it.
7Typically a sensor is represented as a class and instantiated.
8
9The constructor is expected to initialise the sensor and parameters may be used
10to provide identification/pin location on the board.
11
12Typically an update() function will be called in order to get new data from the
13sensor in order to reduce load when doing multiple reads to sensor data.
14
15### Example
16
17A sensor/actuator is expected to work as such (here is the MMA7660 accelerometer API):
18```C++
19  // Instantiate an MMA7660 on I2C bus 0
20  upm::MMA7660 *accel = new upm::MMA7660(MMA7660_I2C_BUS,
21                                         MMA7660_DEFAULT_I2C_ADDR);
22
23  // place device in standby mode so we can write registers
24  accel->setModeStandby();
25
26  // enable 64 samples per second
27  accel->setSampleRate(upm::MMA7660::AUTOSLEEP_64);
28
29  // place device into active mode
30  accel->setModeActive();
31
32  while (shouldRun)
33    {
34      int x, y, z;
35
36      accel->getRawValues(&x, &y, &z);
37      cout << "Raw values: x = " << x
38           << " y = " << y
39           << " z = " << z
40           << endl;
41
42      float ax, ay, az;
43
44      accel->getAcceleration(&ax, &ay, &az);
45      cout << "Acceleration: x = " << ax
46           << "g y = " << ay
47           << "g z = " << az
48           << "g" << endl;
49
50      usleep(500000);
51    }
52```
53
54However implementation and API design is completely up to the developer, some
55enumerable sensors for example may provide much clever instantiation. Displays
56may also create more complex structures in order to interface with them.
57
58Browse through the list of all [examples](https://github.com/intel-iot-devkit/upm/tree/master/examples).
59
60Multi-sensor samples for the starter and specialized kits can be found in the
61[iot-devkit-samples](https://github.com/intel-iot-devkit/iot-devkit-samples) repository.
62
63### Supported Sensors
64
65Supported [sensor list](http://iotdk.intel.com/docs/master/upm/modules.html) from API documentation.
66
67You can also refer to the [Intel® IoT Developer Zone](https://software.intel.com/iot/sensors).
68
69### IDE Integration
70
71If you would like to create projects and run the UPM samples using an Intel recommended IDE,
72please refer to the Intel Developer Zone IDE page.
73
74<a href="https://software.intel.com/iot/software/ide"><img src="docs/icons/allides.png"/></a>
75
76### Building UPM
77
78See building documentation [here](docs/building.md).
79
80### Making your own UPM module
81
82Porting [link](docs/porting.md) has more information on making new UPM modules.
83
84There is also an example available for max31855 [sensor](docs/max31855.md).
85
86### Naming conventions and rules for new UPM contributions
87
88Before you begin development, take a look at our naming [conventions](docs/naming.md).
89
90Also, please read the guidelines for contributions [to UPM](docs/contributions.md).
91
92Don't forget to check the documentation [section](docs/documentation.md).
93
94Make sure you add yourself as an author on every new code file submitted.
95If you are providing a fix with significant changes, feel free to add yourself
96as a contributor. Signing-off your commits is mandatory.
97
98API Documentation
99==============
100
101<a href="http://iotdk.intel.com/docs/master/upm"><img src="docs/icons/c++.png"/></a>
102<a href="http://iotdk.intel.com/docs/master/upm/java"><img src="docs/icons/java.png"/></a>
103<a href="http://iotdk.intel.com/docs/master/upm/python"><img src="docs/icons/python.png"/></a>
104<a href="http://iotdk.intel.com/docs/master/upm/node"><img src="docs/icons/node.png"/></a>
105
106### Changelog
107Version changelog [here](docs/changelog.md).
108
109### Known Limitations
110List of known limitations [here](docs/knownlimitations.md).
111