static int Main() { if (WiringPi.WiringPiSetupGpio() != -1) { Console.WriteLine("Raspberry Pi LED blinking example"); WiringPi.PinMode(LED, WiringPi.Output); for (int loop = 0; loop < 3; loop++) { WiringPi.DigitalWrite(LED, WiringPi.High); Console.WriteLine("on"); Thread.Sleep(500); WiringPi.DigitalWrite(LED, WiringPi.Low); Console.WriteLine("off"); Thread.Sleep(500); } return(0); } Console.WriteLine("wiringPiSetup error"); return(1); }
static void SetRYG(int red, int yellow, int green) { WiringPi.DigitalWrite(Red, red); WiringPi.DigitalWrite(Yellow, yellow); WiringPi.DigitalWrite(Green, green); }