예제 #1
0
        private void _getThermometers()
        {
            this._owBus.Reset();

            //Remove the current thermometers
            this._thermometers.Clear();

            //Check to see if we find a new thermometer
            byte[] address = new byte[8];

            while (this._owBus.Search_GetNextDevice(address))
            {
                //if we do and its a DS18B20 add it to the list

                Debug.Print("Device Found!");

                M8_DS18B20 temp = new M8_DS18B20();
                temp.setAddress(address);

                Debug.Print(temp.ToString());

                this._thermometers.Add(temp);
            }
        }
예제 #2
0
        private void _getThermometers()
        {
            this._owBus.Reset();

            //Remove the current thermometers
            this._thermometers.Clear();

            //Check to see if we find a new thermometer
            byte[] address = new byte[8];

            while (this._owBus.Search_GetNextDevice(address))
            {
                //if we do and its a DS18B20 add it to the list

                Debug.Print("Device Found!");

                M8_DS18B20 temp = new M8_DS18B20();
                temp.setAddress(address);

                Debug.Print(temp.ToString());

                this._thermometers.Add(temp);
            }
        }