Beispiel #1
0
        public void Toggle()
        {
            int pin = 18;

            WiringPiWrapper.WiringPiSetupGpio();
            WiringPiWrapper.PinMode(pin, PinType.OUTPUT);

            while (true)
            {
                WiringPiWrapper.DigitalWrite(pin, 0);
                WiringPiWrapper.DigitalWrite(pin, 1);
            }
        }
        public void Init()
        {
            WiringPiWrapper.WiringPiSetupGpio();

            WiringPiWrapper.PinMode(RegisterSelectPin, PinType.OUTPUT);
            WiringPiWrapper.PinMode(EnablePin, PinType.OUTPUT);

            WiringPiWrapper.PinMode(D4Pin, PinType.OUTPUT);
            WiringPiWrapper.PinMode(D5Pin, PinType.OUTPUT);
            WiringPiWrapper.PinMode(D6Pin, PinType.OUTPUT);
            WiringPiWrapper.PinMode(D7Pin, PinType.OUTPUT);

            WiringPiWrapper.DigitalWrite(EnablePin, 0);

            Thread.Sleep(DeleayInMs);                   //Wait for more than 40ms after Vcc rises to 2.7V

            LCD_command(0x33);
            LCD_command(0x32);


            LCD_command(0x28);                  //function set: 4 bit, 2 Zeilen, 5x8	//ACHTUNG DOTS immer zählen!!
            LCD_command(0x0C);                  //Display Control: display on, cursor on, no blinking
            LCD_command(0x06);                  //Entry Mode set: autoincrement, no display shift
        }