public static int ChangeSerialMode(int mode) { const int pinSerial = 1; //Pin 1 ^= GPIO18 Init.WiringPiSetup(); GPIO.PinMode(pinSerial, (int)GPIOpinmode.Output); GPIO.DigitalWrite(pinSerial, mode == 1 ? 1 : 0); return(0); }
static void Main(string[] args) { Setup.WiringPiPiSetupGpio(); GPIO.PinMode(18, WiringPi.Output); while (true) { GPIO.DigitalWrite(18, WiringPi.High); Thread.Sleep(500); GPIO.DigitalWrite(18, WiringPi.Low); Thread.Sleep(500); } }
public void SetValue(GPIO.GPIOpinvalue value) { GPIO.DigitalWrite(Number, (int)value); }