/// <summary> /// Create a new instance of LED74HC595Driver /// </summary> /// <param name="dioPin">DIO Pin Number</param> /// <param name="rclkPin">RCLK Pin Number</param> /// <param name="sclkPin">SCLK Pin Number</param> public LED74HC595Driver(int dioPin, int rclkPin, int sclkPin) { var gpio = GpioController.GetDefault(); // setup the pins PinDIO = gpio.OpenPin(dioPin); PinDIO.SetDriveMode(GpioPinDriveMode.Output); PinRCLK = gpio.OpenPin(rclkPin); PinRCLK.SetDriveMode(GpioPinDriveMode.Output); PinSCLK = gpio.OpenPin(sclkPin); PinSCLK.SetDriveMode(GpioPinDriveMode.Output); // initialize the pins to low PinDIO.Write(GpioPinValue.Low); PinRCLK.Write(GpioPinValue.Low); PinSCLK.Write(GpioPinValue.Low); }
// Pulse Register Clock //push data to pins private void PulseRCLK() { PinRCLK.putEnabled(true); PinRCLK.putEnabled(false); }
// Pulse Register Clock private void PulseRCLK() { PinRCLK.Write(GpioPinValue.Low); PinRCLK.Write(GpioPinValue.High); }