Community
cancel
Showing results for 
Search instead for 
Did you mean: 
LGran2
Beginner
1,287 Views

[UPM] UPM hp20x library

Jump to solution

Hello everyone!

I have bought a grove barometer (this one: http://wiki.seeed.cc/Grove-Barometer-High-Accuracy/ Grove - Barometer (High-Accuracy) - Seeed Wiki) and I'm really interested in using the UPM library hp20x to use it.

I tried the following git example : https://github.com/intel-iot-devkit/upm/blob/master/examples/c%2B%2B/hp20x.cxx upm/hp20x.cxx at master · intel-iot-devkit/upm · GitHub.

The build of this program doesn't work but I think I do it the wrong way, can you help me?

I tried several commands as :

- g++ test.cpp -lmraa -Wall

- g++ test.cpp -lmraa -lupm -Wall

- g++ test.cpp -lmraa -lupm-hp20x

None of these works.... I get this error : "Couldn't find hp20x.hpp". I checked, and I have a hp20x.so in my /usr/lib directory!

What can I do?

Thank you for your help!

Leo

0 Kudos
1 Solution
idata
Community Manager
71 Views

Hi Grany,

Thanks for your interest in the Intel® Edison™ Platform.

I'm sorry to hear that you are having problems compiling the hp20x sample code. I started to investigate and I found this tutorial (http://shawnhymel.com/756/writing-your-own-upm-module-getting-started/ Writing Your Own UPM Module: Getting Started | Shawn Hymel ), after reading through out the guide, I concluded that this command: g++ hp20x.cxx -lupm-hp20x -I/usr/include/upm was the one that I needed, fortunately it compiled! You should know that after the compilation is over it generates a "a.out" file, this your executable file, so in order to try it use this command: ./a.out .

Now, unfortunately, I don't have this barometer at hand, so I can't test it out. Could you be so kind to test it, in order to see if this sample code works.

I will be waiting for your reply, have a nice day!

Best Regards,

 

-Jose P.

View solution in original post

3 Replies
idata
Community Manager
72 Views

Hi Grany,

Thanks for your interest in the Intel® Edison™ Platform.

I'm sorry to hear that you are having problems compiling the hp20x sample code. I started to investigate and I found this tutorial (http://shawnhymel.com/756/writing-your-own-upm-module-getting-started/ Writing Your Own UPM Module: Getting Started | Shawn Hymel ), after reading through out the guide, I concluded that this command: g++ hp20x.cxx -lupm-hp20x -I/usr/include/upm was the one that I needed, fortunately it compiled! You should know that after the compilation is over it generates a "a.out" file, this your executable file, so in order to try it use this command: ./a.out .

Now, unfortunately, I don't have this barometer at hand, so I can't test it out. Could you be so kind to test it, in order to see if this sample code works.

I will be waiting for your reply, have a nice day!

Best Regards,

 

-Jose P.

View solution in original post

LGran2
Beginner
71 Views

Thank you for your answer!

It works really fine!

Leo

idata
Community Manager
71 Views

Hi Leo,

 

 

I'm glad to hear that it worked! Please don't hesitate to contact us back if any questions come up.

 

 

Have a great day!

 

 

Best Regards,

 

-Jose P.
Reply