Exemplo n.º 1
0
 private void ReleaseClockLock()
 {
     DatPin.Write(GpioPinValue.Low);
     for (int count = 0; count < 32; count++)
     {
         ClockPin.Write(GpioPinValue.High);
         ClockPin.Write(GpioPinValue.Low);
     }
 }
Exemplo n.º 2
0
        private void write_byte(byte input)
        {
            int  value;
            byte modded = Convert.ToByte(input);

            for (int count = 0; count < 8; count++)
            {
                value = modded & 128;
                DatPin.Write(value == 128 ? GpioPinValue.High : GpioPinValue.Low);
                ClockPin.Write(GpioPinValue.High);
                modded = Convert.ToByte((modded << 1) % 256);
                ClockPin.Write(GpioPinValue.Low);
            }
        }