Exemplo n.º 1
0
 /// <summary>
 /// Initialises a PwmController bound to the specified pin on a PiFace Digital
 /// device, with the specified cycle period. The initial duty load is also set
 /// to the specified value, although the "Start" method must be called to
 /// start the controller.
 /// </summary>
 /// <param name="piface"></param>
 /// <param name="outputPin"></param>
 /// <param name="period"></param>
 /// <param name="duty"></param>
 public PwmPinController(IPiFaceDevice piface, byte outputPin, int period, float duty)
     : base(piface)
 {
     // copy the parameters locally
     this.OutputPin = outputPin;
     this.SetTimers(period, duty);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initialises a PwmController bound to the specified pin on a PiFace Digital
 /// device, with the specified cycle period. The initial duty load is also set
 /// to the specified value, although the "Start" method must be called to
 /// start the controller.
 /// </summary>
 /// <param name="piface"></param>
 /// <param name="outputPin"></param>
 /// <param name="period"></param>
 /// <param name="duty"></param>
 public PwmPinController(IPiFaceDevice piface, byte outputPin, int period, float duty)
     : base(piface)
 {
     // copy the parameters locally
     this.OutputPin = outputPin;
     this.SetTimers(period, duty);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Creates a new PiFaceTcpServer that is bound to the specified IPiFaceDevice.
 /// </summary>
 /// <param name="device">
 /// The device to bind to. This doesn't have to be a pyhsical device - for example
 /// a PiFaceEmulator device could be used instead.
 /// </param>
 /// <param name="localEndPoint"></param>
 public PiFaceTcpServer(IPiFaceDevice device, IPEndPoint localEndPoint)
 {
     // validate the parameters
     if (device == null)
     {
         throw new ArgumentNullException("device");
     }
     if (localEndPoint == null)
     {
         throw new ArgumentNullException("localEndPoint");
     }
     // copy the parameters locally
     this.PiFaceDevice = device;
     this.LocalEndPoint = localEndPoint;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Creates a new PiFaceTcpServer that is bound to the specified IPiFaceDevice.
 /// </summary>
 /// <param name="device">
 /// The device to bind to. This doesn't have to be a pyhsical device - for example
 /// a PiFaceEmulator device could be used instead.
 /// </param>
 /// <param name="localEndPoint"></param>
 public PiFaceTcpServer(IPiFaceDevice device, IPEndPoint localEndPoint)
 {
     // validate the parameters
     if (device == null)
     {
         throw new System.ArgumentNullException("device");
     }
     if (localEndPoint == null)
     {
         throw new System.ArgumentNullException("localEndPoint");
     }
     // copy the parameters locally
     this.PiFaceDevice  = device;
     this.LocalEndPoint = localEndPoint;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Initialises a BlinkController bound to the specified pin on a PiFace Digital
 /// device.
 /// </summary>
 /// <param name="piface"></param>
 /// <param name="outputPin"></param>
 /// <param name="interval">
 /// The number of milliseconds between turning the output pin on and off.
 /// </param>
 public BlinkingPinController(IPiFaceDevice piface, byte outputPin, int interval)
     : base(piface)
 {
     this.OutputPin = outputPin;
     this.Interval  = interval;
 }
Exemplo n.º 6
0
 /// <summary>
 /// Initialises a BlinkController bound to the specified pin on a PiFace Digital
 /// device.
 /// </summary>
 /// <param name="piface"></param>
 /// <param name="outputPin"></param>
 /// <param name="interval">
 /// The number of milliseconds between turning the output pin on and off.
 /// </param>
 public BlinkingPinController(IPiFaceDevice piface, byte outputPin, int interval)
     : base(piface)
 {
     this.OutputPin = outputPin;
     this.Interval = interval;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Initialises a PwmController bound to the specified pin on a PiFace Digital
 /// device, with the specified cycle period. The initial duty load is set to zero,
 /// and the "Start" method must be called to start the controller.
 /// </summary>
 /// <param name="piface"></param>
 /// <param name="outputPin"></param>
 /// <param name="period"></param>
 public PwmPinController(IPiFaceDevice piface, byte outputPin, int period)
     : this(piface, outputPin, period, 0)
 {
 }
Exemplo n.º 8
0
 /// <summary>
 /// Initialises a PwmController bound to the specified pin on a PiFace Digital
 /// device, with the specified cycle period. The initial duty load is set to zero,
 /// and the "Start" method must be called to start the controller.
 /// </summary>
 /// <param name="piface"></param>
 /// <param name="outputPin"></param>
 /// <param name="period"></param>
 public PwmPinController(IPiFaceDevice piface, byte outputPin, int period)
     : this(piface, outputPin, period, 0)
 {
 }
Exemplo n.º 9
0
 /// <summary>
 /// Creates a new background pin controller that is bound to the specified
 /// PiFace Digital device.
 /// </summary>
 /// <param name="piface"></param>
 protected BackgroundPinController(IPiFaceDevice piface)
     : base(piface)
 {
 }
Exemplo n.º 10
0
 /// <summary>
 /// Creates a new background pin controller that is bound to the specified
 /// PiFace Digital device.
 /// </summary>
 /// <param name="piface"></param>
 protected BackgroundPinController(IPiFaceDevice piface)
     : base(piface)
 {
 }
Exemplo n.º 11
0
 /// <summary>
 /// Initialises a new pin controller and binds it to a specific PiFace Digital device.
 /// </summary>
 /// <param name="piface">
 /// A reference to the PiFace Digital device to control the output pins on.
 /// </param>
 protected PinControllerBase(IPiFaceDevice piface)
 {
     this.PiFace = piface;
 }
Exemplo n.º 12
0
 /// <summary>
 /// Initialises a new pin controller and binds it to a specific PiFace Digital device.
 /// </summary>
 /// <param name="piface">
 /// A reference to the PiFace Digital device to control the output pins on.
 /// </param>
 protected PinControllerBase(IPiFaceDevice piface)
 {
     this.PiFace = piface;
 }