Ejemplo n.º 1
0
 private GpioPin MapUnosquarePin(Unosquare.RaspberryIO.Gpio.GpioPin pin)
 {
     return(new GpioPin
     {
         WiringPinNumber = (int)pin.WiringPiPinNumber,
         PhysicalPinNumber = pin.HeaderPinNumber,
         Name = pin.Name
     });
 }
Ejemplo n.º 2
0
        public PCA9685(I2CDevice device, Unosquare.RaspberryIO.Gpio.GpioPin outputEnable)
        {
            this.write5   = new byte[5];
            this.write2   = new byte[2];
            this.write1   = new byte[1];
            this.read1    = new byte[1];
            this.disposed = false;

            this.device       = device;
            this.outputEnable = outputEnable;

            if (this.outputEnable != null)
            {
                this.outputEnable.PinMode = Unosquare.RaspberryIO.Gpio.GpioPinDriveMode.Output;

                this.outputEnable.Write(Unosquare.RaspberryIO.Gpio.GpioPinValue.Low);
            }

            this.WriteRegister(Register.Mode1, 0x20);
            this.WriteRegister(Register.Mode2, 0x06);
        }
Ejemplo n.º 3
0
 public void Test()
 {
     Unosquare.RaspberryIO.Gpio.GpioPin c = Pi.Gpio[Unosquare.RaspberryIO.Gpio.WiringPiPin.Pin03];
 }
 public GpioPinData(int id, SignalLevel value, Unosquare.RaspberryIO.Gpio.GpioPin pinInfo)
 {
     this.Id      = id;
     this.Value   = value;
     this.PinInfo = pinInfo;
 }