void Start() { _serial = new SerialHandler(); _serial.portName = COMPort; _serial.baudRate = 115200; _data[0] = (byte)'d'; _serial.OnDataReceived += OnDataReceived; _serial.Open(false); }
// Use this for initialization void Start() { Debug.Log("@SerialTestClient"); SerialHandler.Open(); SerialHandler.Pressed += onPressed; SerialHandler.Pressing += onPressing; SerialHandler.Released += onReleased; SerialHandler.SwitchOn += onSwitchOn; SerialHandler.SwitchOff += onSwitchOff; }
// [Inlet] // public float Actuator5 // { // set // { // Actuators[4] = CheckTemp(value); // } // } void Start() { _serial = new SerialHandler(); _serial.portName = COMPort; _serial.baudRate = 115200; _serial.OnDataReceived += OnDataReceived; _serial.Open(true); Thread.Sleep(500); for (int i = 0; i < 4; ++i) { _average[i] = new MovingAverageF(SamplesCount); } }
void Start() { serial = SerialHandler.Instance; bool success = serial.Open(portNum, SerialHandler.Baudrate.B_115200); if (!success) { return; } serial.OnDataReceived += SerialCallBack; // player = GameObject.Find("Player") as GameObject; // // }
private void Button_Click(object sender, RoutedEventArgs e) { ourPort = new SerialHandler(comCombo.SelectedItem.ToString(), int.Parse(baudCombo.SelectedItem.ToString())); ourPort.Open(); }
void Start() { SerialHandler.Open(); }
//For debug //will not need soon /* * public void portSetter (int p1, int p2, int p3, int p4, int p5){ * text_MessageLog.text = "port set"; * tmpInt_p1 = p1 - 33024; * tmpInt_p2 = p2 - 33024; * tmpInt_p3 = p3 - 33024; * tmpInt_p4 = p4; * tmpInt_p5 = p5; * } */ //For debug public void serialOpener() { serialHandler.Open(); }