using System.Collections; using System.Collections.Generic; using UnityEngine; public class SetUpTrial : MonoBehaviour { //Variables needed for the ChairController script to work public Vector2 centrePos = new Vector2(500f, 300f); public int inputType = 3; public int expType = 4; public bool oppositeDay = false; //Variables needed to get the chair movement started private bool chairMoving = false; private SerialController serialController; //pointer to SerialController script private void Start() { serialController = GetComponent(); //Connect to the serialController script } void Update() { if(!chairMoving) //Get communication with the arduino kicked off to allow chair movement { serialController.SendSerialMessage("0512"); //Send signal to move at speed of zero chairMoving = true; } } }