public string sendToArduino(string code, ArduinoPort port) { string folderPath = CreateIno(code); CLI("compile --fqbn arduino:avr:mega " + folderPath); return(CLI("upload --fqbn arduino:avr:mega -p " + port.address + " " + folderPath)); }
private void OnSelectPort(object sender, RoutedEventArgs e) { MenuItem button = (MenuItem)sender; var text = button.Header.ToString(); var portADD = text.Substring(0, text.IndexOf(":")); ArduinoPort ardPort = this.ports.Find(port => port.address.IndexOf(portADD) >= 0); if (ardPort == null) { return; } this.selectedPort = ardPort; this.PortSelector.Header = "Port: " + this.selectedPort.address; }