public void Run()
        {
            var pins = new int[] { 2, 3, 4 };
            var pinConfig = new PinConfig(PinTypeEnum.PWM);
            var actuatorPins = new ActuatorPins(pins, pinConfig, 50);

            // create a sender to send pin info
            messageSender = new OnOffActuatorPinSender(a, actuatorPins);

            var code = messageSender.Code;


            // upload the code
            u.UploadCode(a, code);

            a.OnConnected += a_OnConnected;
            a.OnDisconnected += a_OnDisconnected;
            a.OpenConnection();


        }
 public OnOffActuatorPinSender(ArduinoConnection con, ActuatorPins pins)
 {
     this.pinSender = new SimplePinSender(con);
     this.pins = pins;
 }
Exemplo n.º 3
0
 public OnOffActuatorPinSender(ArduinoConnection con, ActuatorPins pins)
 {
     this.pinSender = new SimplePinSender(con);
     this.pins      = pins;
 }