Vala bindings and examples added. Minor clean-up in header file
[freerunner-navigation-board:bmp085.git] / userspace / vala / example.vala
1 using GLib;
2 using Bmp;
3
4 public class Hello : GLib.Object {
5     public static int main(string[] args) {
6         BmpData data; 
7         open_bmp085(0,out data);
8         int temp=get_temperature(data);
9         int pressure=get_pressure(data);
10
11         stdout.printf("Pressure: %fhPa\tt:, Temperature: %fC\n", pressure/100.0, temp/10.0);
12         close_bmp085(data);
13
14
15         return 0;
16     }
17 }