private void sendStepsButton_Click(object sender, EventArgs e) { string rawHeading = headingTextBox.Text; try { int heading = int.Parse(rawHeading); if (heading >= 0 && heading <= 359) { ArduinoConnector.WriteHeadingIntToPort(heading); } else { ArduinoConnector.LogText("Bad heading '" + rawHeading + "'"); } } catch (Exception ex) { string exceptionString = "Form1.sendStepsButton_Click()->Exception:: '" + ex.Message + "'"; ArduinoConnector.LogText(exceptionString); } }
private void button1_Click(object sender, EventArgs e) { ArduinoConnector.ReadFromPort(); }
//private void ConnectButton_Click(object sender, EventArgs e) //{ //} void Form1_FormClosed(object sender, FormClosedEventArgs e) { ArduinoConnector.ClosePort(); }
private void sendEscapeCharButton_Click_1(object sender, EventArgs e) { ArduinoConnector.WriteToPort("\0"); }
private void sendZeroButton_Click(object sender, EventArgs e) { ArduinoConnector.WriteToPort("0"); }
private void closePortButton_Click(object sender, EventArgs e) { ArduinoConnector.ClosePort(); }
private void connectButton_Click_1(object sender, EventArgs e) { ArduinoConnector.ConnectToArduino(portNameTextBox.Text, 9600); }