Barometer in C#

Hi, I’m in High School and I’m working on a Cerbuino FEZ in C#.

I need to mesure the altitude with the barometer and put it on the display N18. I know how to write on the display but I don't know what to do with the barometer. I've search every where...

If anyone of you could give me a code so I can look at it, or even a website, I would be thanksfull to you :wink:

Welcome to the forum Ragn!

Can I ask, do you have the barometer connected in the Gadgeteer designer ? has the driver if not, but it also is a reference to tell you what methods the driver exposes. From that you can figure out how to get the baro reading. From that, it seems like you’ll use a measurement completed handler (look for MeasurementCompleteEventArgs), and you’ll call either the single measurement request or start doing constant readings, depending on how often you expect the barometric pressure to change.

@ Ragn - have a look here as an overview for how this works Altimeter - Wikipedia
And there are lots of code samples for the barometer module in the code share section

@ Ragn - Welcome to the community! Do you mind sharing a little more about your class? First, are you part of @ Gary’s class? If not… Is your entire class using Gadgeteer or did you pick it on your own? Is this part of your core curriculum or an after school program? Is a member here your instructor? Would you share as much about the location of your school as you’re comfortable with? Sorry if I’m prying too much but I’m interested in learning more about your curriculum and how Gadgeteer became a part of it.