public void DigitalWrite(int pin, PinValue value)
        {
            DigitalValue digitalValue = value == 0 ? DigitalValue.Low : DigitalValue.High;

            _log.DebugFormat("DigitalWrite pin " + pin + "=" + value.ToString());
            _driver.Send(new ArduinoDriver.SerialProtocol.DigitalWriteRequest((byte)pin, digitalValue));
        }
Пример #2
0
 public void Start()
 {
     _log.DebugFormat("Starting Controller...");
     // Open interface
     _interface.Start();
     // Start controller thread
     _thread   = new Thread(_process);
     _continue = true;
     _thread.Start();
     _log.DebugFormat("Controller Started!");
 }