Sample usage

public class Program
    {
        public static void Main()
        {
            Cpu.Pin pin = (Cpu.Pin)FEZ_Pin.Digital.Di0;

            DS1820 sensors = new DS1820(pin);

            while (true)
            {
                ArrayList data = sensors.GetAllSensorData(1000);

                foreach (object obj in data)
                {
                    DS1820.DS1820Data info = (DS1820.DS1820Data)obj;                                  

                    Debug.Print("Address: " + info.Address[1].ToString() + " Temperature: " 
                        + info.Celcius.ToString("F2") + "/" + info.Fahrenheit.ToString("F2") + "\n");
                }
            }
        }        
    }    


Last edited Jun 7, 2012 at 1:30 PM by ronaldcamcam, version 4