using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using GHI.Hardware.EMX;

namespace CPF
{
    public class Program
    {
        public static void ReportPressure(double pressureIn_dBar)
        {
            Debug.Print("Callback ==> " + pressureIn_dBar.ToString("F2"));
        }

        public static void Main()
        {
            SBE41 foo = new SBE41();
            Debug.Print("##################################################################");
            foo.Callback = ReportPressure;
            foo.EnterCommandMode();
            foo.ExitCommandMode();
            //foo.Start(1.0, 2000);
            while (true)
            {
                foo.Sample(null);
                Thread.Sleep(1000);
            }
        }
    }
}
