using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace ProjektArbeit2013 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { serialPort1.Open(); char[] wert = new Char[3]; wert[0] = Convert.ToChar(numericUpDown1.Value/4); wert[1] = Convert.ToChar(numericUpDown2.Value/4); wert[2] = Convert.ToChar(numericUpDown3.Value/4); serialPort1.Write(wert, 0, 3); } private void numericUpDown1_ValueChanged(object sender, EventArgs e) { Convert.ToByte(numericUpDown1); } } }