Beispiel #1
0
 public Tb67h420ftg(IIODevice device,
                    IPin inA1, IPin inA2, IPin pwmA,
                    IPin?inB1, IPin?inB2, IPin?pwmB,
                    IPin?fault1, IPin?fault2,
                    IPin?hbMode = null, IPin?tblkab = null) : this(
         inA1 : device.CreatePwmPort(inA1), inA2 : device.CreatePwmPort(inA2),
         pwmA : device.CreateDigitalOutputPort(pwmA),
         inB1 : inB1 is null ? null : device.CreatePwmPort(inB1),
         inB2 : inB2 is null ? null : device.CreatePwmPort(inB2),
         pwmB : pwmB is null ? null : device.CreateDigitalOutputPort(pwmB),
         //fault1: null,
         fault1 is null ? null : device.CreateDigitalInputPort(fault1),
         fault2 : null,
         //fault2 is null ? null : device.CreateDigitalInputPort(fault2),
         hbMode : hbMode == null ? null : device.CreateDigitalOutputPort(hbMode),
         tblkab : tblkab == null ? null : device.CreateDigitalOutputPort(tblkab)
         )
 {
 }
Beispiel #2
0
 public CharacterDisplay(
     IIODevice device,
     IPin pinV0,
     IPin pinRS,
     IPin pinE,
     IPin pinD4,
     IPin pinD5,
     IPin pinD6,
     IPin pinD7,
     ushort rows = 4, ushort columns = 20) :
     this(
         device.CreatePwmPort(pinV0, 100, 0.5f, true),
         device.CreateDigitalOutputPort(pinRS),
         device.CreateDigitalOutputPort(pinE),
         device.CreateDigitalOutputPort(pinD4),
         device.CreateDigitalOutputPort(pinD5),
         device.CreateDigitalOutputPort(pinD6),
         device.CreateDigitalOutputPort(pinD7),
         rows, columns)
 {
 }
 /// <summary>
 /// Create a new PiezoSpeaker instance
 /// </summary>
 /// <param name="pin">PWM Pin connected to the PiezoSpeaker</param>
 public PiezoSpeaker(IIODevice device, IPin pin, float frequency = 100, float dutyCycle = 0) :
     this(device.CreatePwmPort(pin, frequency, dutyCycle))
 {
 }
Beispiel #4
0
 public Servo(IIODevice device, IPin pwm, ServoConfig config) :
     this(device.CreatePwmPort(pwm), config)
 {
 }