Exemple #1
0
        public HD44780U(MCP23017 exp, Register reg)
        {
            expander = exp;
            register = reg;

            if (register == Register.GPIOA)
            {
                expander.Write(MCP23017.Register.IODIRA, 0x00);
                expander.Write(MCP23017.Register.GPIOA, 0x00);
            }
            else
            {
                expander.Write(MCP23017.Register.IODIRB, 0x00);
                expander.Write(MCP23017.Register.GPIOB, 0x00);
            }
        }
Exemple #2
0
 //For use with the MCP23017 I/O expander GPIO pins
 public HCSR04(MCP23017 Expander, MCP23017.Pin TriggerPin, MCP23017.Pin EchoPin)
 {
     expander     = Expander;
     ioTriggerPin = TriggerPin;
     ioEchoPin    = EchoPin;
 }