public void Print(char C, int SegNumber)
        {
            char Address   = SegAddressArray[SegNumber];
            char Character = (char)Mapping(C);

            InputOutputDriver.Write(Address, Character);
        }
        public bool GetCharacter()
        {
            char x, Mask;

            num  = InputOutputDriver.Read((char)5);
            Mask = Utility.BinaryToChar("00010000");
            x    = (char)(num & Mask);

            return(x == Mask);
        }
        public double readADC()
        {
            InputOutputDriver.Write((char)6, Utility.BinaryToChar("00000001"));
            System.Threading.Thread.Sleep(50);
            InputOutputDriver.Write((char)6, Utility.BinaryToChar("00000000"));
            System.Threading.Thread.Sleep(50);
            char digital = InData();

            digital &= Utility.BinaryToChar("00011111");
            return(calcVolt(digital));
        }
        public char GetNumber()
        {
            char x, Mask;

            do
            {
                num  = InputOutputDriver.Read((char)5);
                Mask = Utility.BinaryToChar("00010000");
                x    = (char)(num & Mask);
            } while (x != Mask);

            while ((InputOutputDriver.Read((char)5) & Mask) != 0)
            {
            }
            ;

            Mask = Utility.BinaryToChar("00001111");
            num  = (char)(num & Mask);
            return(mapping(num));
        }
Beispiel #5
0
 private char InData()
 {
     return(InputOutputDriver.Read((char)3));
 }
 public void TurnSpeakerOn()
 {
     InputOutputDriver.Write((char)0, (char)1);
 }
 public KeypadDriver()
 {
     InOut = new InputOutputDriver();
 }
 char InData()
 {
     return(InputOutputDriver.Read((char)4));
 }