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);
        }
Beispiel #2
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);
     }
 }
Beispiel #3
0
 public static int ChangeGpioMode(int pin, GPIOpinmode mode)
 {
     Init.WiringPiSetup();
     GPIO.PinMode(pin, (int)mode);
     return(0);
 }