상속: napkin.devices.serial.common.ThreadedSerialDevice
예제 #1
0
파일: Program.cs 프로젝트: cjdaly/napkin
        public static void Main()
        {
            Debug.Print("Hello!   mem: " + Debug.GC(false));

            _cerbee2 = new ThreadedSerialDevice();
            _cerbee2.ReadLine += new ThreadedSerialDevice.ReadHandler(_cerbee2_ReadLine);

            _midiDriver = new MidiDriver(Pins.GPIO_PIN_D4);
            _midiDriver.Reset();

            _uLcd144 = new ULcd144Device(Pins.GPIO_PIN_D9, Serial.COM3);
            _uLcd144.Reset();
            _uLcd144.Clear();
            _uLcd144.WriteMessage("Hello", 0, 0);
            _uLcd144.WriteMessage("World!", 0, 1);

            _deadOnRtc = new DeadOnRTCDriver(Pins.GPIO_PIN_D10, SPI_Devices.SPI1);

            for (int i = 0; i < 4; i++)
            {
                DeadOnRTCData rtcData = _deadOnRtc.ReadData();
                DateTime dt = rtcData.GetDateTime();
                Debug.Print("DateTime: " + dt.ToString());
                _uLcd144.ConsoleWriteLine(dt.ToString());
                Thread.Sleep(5000);
            }

            Debug.Print("Goodbye!   mem: " + Debug.GC(false));
        }
예제 #2
0
파일: Program.cs 프로젝트: cjdaly/napkin
        public static void Main()
        {
            Debug.Print("hello");

            ULcd144Device uLcd144 = new ULcd144Device(Pins.GPIO_PIN_D13, Serial.COM2);
            uLcd144.ReadLine += new ThreadedSerialDevice.ReadHandler(uLcd144_ReadLine);
            uLcd144.Reset();
            Thread.Sleep(3000);
            Debug.Print("test");

            uLcd144.Test();

            Debug.Print("goodbye");
        }