1. Start from Eclipse welcome page:


  2. Click Create C/C++ IoT Project, give your new project a name and then select one of the On board LED blink examples and click Finish.


  3. On the right hand side of your window you can find Sensor Examples using UPM libraries (GitHub). Click on it and you will see the GitHub repository


    From here you have to choose if you want to use the latest available examples which might not work fully with your environment or use the ones for your environment.

Tested Examples

  1. First you need to select the branch fitting to your environment (Currently this is v0.1.8). For this click on the branch button:


  2. Then click on Tags and select v0.1.8.


  3. From the resulting list, choose the sensor you would like to use by clicking on it (for example, 4digitdisplay.cxx).


  4. Click on Raw and copy the source code into your main file located under projectName\src\projectName.cpp.



  5. Now you have to tell eclipse to use the corresponding library. In your main file, find the line which includes the sensor:

  6. In this case we need the lib for the tm1637. Click right on your project and selectProperties.


  7. Go to C/C++ Build and Settings and choose Libraries underCross G++ Linker. There you press the Add button.


  8. The name of the lib always starts with upm- followed by the name of the included sensor. In this case it would beupm-tm1637.


  9. Now close both windows by hitting ok. You should be able to build your project by now.

Newer sensors from latest development

In this case we need to include the header and source file to our project directly, we can't add the header and then the corresponding library at link time (as there's no code for that sensor in the library yet or the code might be outdated).

  1. Choose the master branch, then select c++.


  2. Choose whatever sensor you would like to use.


  3. Click on Raw and copy the source code into your main file located under projectName\src\projectName.cpp.



  4. Click on UPM in your browser.


  5. Goto src.


  6. Choose the sensor you are going to use and click it.
  7. Copy the .cxx and the .h file into your src folder.


  8. Now try if it is already working. If not there are additional libraries needed to be linked in. Therefore open the header file you just copied.
  9. Here you should find the lib you need and include the lib in eclipse (like described here).
  10. Now you should be able to work with the new Sensor.