예제 #1
0
        public async Task <bool> Init(int address)
        {
            var result = await _i2cDevice.Init(address);

            if (!result)
            {
                return(false);
            }

            byte[] b = new byte[1];
            _i2cDevice.Read(b);
            _shadow      = Convert.ToInt32(b[0]);
            _initialised = true;

            return(true);
        }
예제 #2
0
파일: ADS1015.cs 프로젝트: valoni/xIOT
 public async Task <bool> Init()
 {
     return(await _i2Cdevice.Init(_address));
 }