コード例 #1
0
    // Update is called once per frame
    void Update()
    {
        List <string> stringList = new List <string>();

        stringList.Add("remoteCount:" + Wii.GetRemoteCount());
        for (int i = 0; i < Wii.GetRemoteCount(); ++i)
        {
            if (Wii.IsActive(i) && Wii.GetExpType(i) == 3)
            {
                Vector4 theBalanceBoard = Wii.GetBalanceBoard(i);
                Vector2 theCenter       = Wii.GetCenterOfBalance(i);
                float   topWeight       = theBalanceBoard.x + theBalanceBoard.y;
                float   bottomWeight    = theBalanceBoard.z + theBalanceBoard.w;
                float   topBottomDiff   = topWeight - bottomWeight;
                stringList.Add("totalWeight:  " + Wii.GetTotalWeight(i) + " kg");
                stringList.Add("centerX:      " + theCenter.x);
                stringList.Add("centerY:      " + theCenter.y);
                stringList.Add("topRight:     " + theBalanceBoard.x + " kg");
                stringList.Add("topLeft:      " + theBalanceBoard.y + " kg");
                stringList.Add("bottomRight:  " + theBalanceBoard.z + " kg");
                stringList.Add("bottomLeft:   " + theBalanceBoard.w + " kg");
                stringList.Add("topWeight:    " + topWeight + " kg");
                stringList.Add("bottomWeight: " + bottomWeight + " kg");
                stringList.Add("topBottomDiff:" + topBottomDiff + " kg");
            }
        }
        consoleText.text = string.Join("\n", stringList);
    }
コード例 #2
0
    // Update is called once per frame
    void Update()
    {
        // - - - - FORWARD REACH CALIBRATION - - - -
        if (Input.GetMouseButtonUp(0))
        {
            CaptureArmLengthAndHeight();
        }

        // Create a new empty vector for the position of the hand
        Vector3 posn3;

        // - - - - SIDE REACH CALIBRATION - - - -
        if (GlobalControl.Instance.rightHanded)
        {
            posn3 = rightHand.transform.position;
        }
        else
        {
            posn3 = leftHand.transform.position;
        }


        // check to see if it is a new maximum
        if (posn3.x > rightReachLocation)
        {
            rightReachLocation = posn3.x;
        }
        else if (posn3.x < leftReachLocation)
        {
            leftReachLocation = posn3.x;
        }

        Vector2 currentCoP = Task.CoPtoCM(Wii.GetCenterOfBalance(0));
    }
コード例 #3
0
 // Update is called once per frame
 void Update()
 {
     wiiBB = CoPtoCM(Wii.GetCenterOfBalance(0));
     //Debug.Log(CoPtoCM(Wii.GetCenterOfBalance(0)));
     //paddleX = Mathf.Clamp(wiiBB.x, transform.TransformPoint(westEdge).x, transform.TransformPoint(eastEdge).x);
     paddleX            = Mathf.Clamp(wiiBB.x, leftBound, rightBound);
     transform.position = new Vector3(paddleX, 22.04f, -3.81f);
 }
コード例 #4
0
    // Zeroes center of balance to the position on which a person is standing on the board
    public void CalibrateCenterOfBalance()
    {
        float   weight             = Wii.GetTotalWeight(remote) / 4;
        Vector4 weigthDistribution = Wii.GetBalanceBoard(remote);

        weightOffset = new Vector4(weight, weight, weight, weight) - weigthDistribution;

        balanceOffset = (float)Wii.GetCenterOfBalance(remote).y;
    }
コード例 #5
0
    // Update is called once per frame
    void Update()
    {
        if (curGameState == GameState.PRE_GAME)
        {
            countdown = countdown - Time.deltaTime;
            feedbackCanvas.UpdateCountdownText(countdown);

            Vector2 currentCoP = CoPtoCM(Wii.GetCenterOfBalance(0));
            basket.GetComponent <Basket>().UpdatePosition(currentCoP);

            // Start game when countdown hits zero
            if (countdown < 0)
            {
                curGameState = GameState.GAME;
                fruitSpawner.SpawnFruit();
                trialTime = 0;
            }
        }
        else if (curGameState == GameState.GAME)
        {
            // Update canvas for the user to see score and time remaining
            timeRemaining = timeRemaining - Time.deltaTime;
            feedbackCanvas.UpdateTimeText(timeRemaining);
            feedbackCanvas.UpdateScoreText(score);

            // Update COP and move basket
            Vector2 currentCoP = CoPtoCM(Wii.GetCenterOfBalance(0));
            basket.GetComponent <Basket>().UpdatePosition(currentCoP);

            CheckBasketObstacle();

            // tick up trial time and check if a new fruit should be spawned
            trialTime = trialTime + Time.deltaTime;
            if (trialTime > trialLength)
            {
                GetComponent <SoundEffectPlayer>().PlaySpawnSound();
                fruitSpawner.SpawnFruit();
                trialTime = 0f;
            }

            if (timeRemaining < 0f)
            {
                curGameState = GameState.GAME_OVER;
                feedbackCanvas.DisplayGameOverText();
            }

            GetComponent <DataHandler>().recordContinuous(Time.time, currentCoP);
        }
        else
        {
            // Game is over
            if (Input.GetKeyUp(KeyCode.Space))
            {
                SceneManager.LoadScene("Menu");
            }
        }
    }
コード例 #6
0
 // Sets max needed leaning values to 70% (forward) and 80% (backward) from the actual leaning done in reality
 public void GetLeanLimits(bool setLeanForward)
 {
     if (setLeanForward == true)
     {
         maxZoneForward = ((float)Wii.GetCenterOfBalance(remote).y - balanceOffset) * 0.7f;
     }
     else
     {
         maxZoneBackward = ((float)Wii.GetCenterOfBalance(remote).y - balanceOffset) * 0.8f;
     }
 }
コード例 #7
0
    // Update is called once per frame
    void Update()
    {
        if (paddle.GetComponent <MovePaddle>().CoPtoCMRaw(Wii.GetCenterOfBalance(0)).x < leftMax)
        {
            leftMax = paddle.GetComponent <MovePaddle>().CoPtoCMRaw(Wii.GetCenterOfBalance(0)).x;
        }

        if (paddle.GetComponent <MovePaddle>().CoPtoCMRaw(Wii.GetCenterOfBalance(0)).x > rightMax)
        {
            rightMax = paddle.GetComponent <MovePaddle>().CoPtoCMRaw(Wii.GetCenterOfBalance(0)).x;
        }
    }
コード例 #8
0
    void FixedUpdate()
    {
        if (Wii.IsActive(whichRemote))            //remote is on
        {
            if (Wii.GetExpType(whichRemote) == 3) //balance board is being used
            {
                Vector4 theBalanceBoard = Wii.GetBalanceBoard(whichRemote);
                Vector2 theCenter       = Wii.GetCenterOfBalance(whichRemote);
                Debug.Log(theBalanceBoard + " " + theCenter);
                Debug.Log("the total weight is: k" + Wii.GetTotalWeight(whichRemote));

                // move self according the center of gravity
                rigidbody.AddForce(new Vector3(theCenter.x * speed, 0, theCenter.y * speed));
            }
        }
    }
コード例 #9
0
    // Update is called once per frame
    void Update()
    {
        bool isPointerActive = false;

        for (int i = 0; i < Wii.GetRemoteCount(); ++i)
        {
            if (Wii.IsActive(i) && Wii.GetExpType(i) == 3)
            {
                isPointerActive = true;
                Vector2 theCenter = Wii.GetCenterOfBalance(i);
                pointerImageRect.transform.position = new Vector3((1 + theCenter.x) * Screen.width / 2, (1 + theCenter.y) * Screen.height / 2);
                break;
            }
        }
        pointerImageRect.gameObject.SetActive(isPointerActive);
    }
コード例 #10
0
    // Update is called once per frame
    void Update()
    {
        //Convert the center of balance to meters
        Vector2 posn = CoPtoM(Wii.GetCenterOfBalance(0));


        Vector3 tposn = pelvisTracker.position;
        Vector3 hposn = hmd.position;

        // WBBposn.y is equal to 3D posn.z
        float newposnx = posn.x;
        float newposny = tposn.y;
        float newposnz = posn.y;

        // Add 17cm to Z position to accurately measure the center of mass as recommended
        // by sacral marker study.
        Vector3 new3Dposn = new Vector3(newposnx, newposny, newposnz);

        GetComponent <Transform>().position = new3Dposn;
    }
コード例 #11
0
    // Update is called once per frame
    void FixedUpdate()
    {
        /*     Returns the weight in kilograms on each of the four sensors in the balance board.
         *             The x-value is the top right sensor.
         *             The y-value is the top left sensor.
         *             The z-value is the bottom right sensor.
         *             The w-value is the bottom left sensor.  */

        x.text = Wii.GetBalanceBoard(0).x.ToString();
        y.text = Wii.GetBalanceBoard(0).y.ToString();
        z.text = Wii.GetBalanceBoard(0).z.ToString();
        w.text = Wii.GetBalanceBoard(0).w.ToString();

        /*     Returns the raw values generated by the four sensors in the balance board.
         *             The x-value is the top right sensor.
         *             The y-value is the top left sensor.
         *             The z-value is the bottom right sensor.
         *             The w-value is the bottom left sensor.  */

        a.text = Wii.GetRawBalanceBoard(0).x.ToString();
        b.text = Wii.GetRawBalanceBoard(0).y.ToString();
        c.text = Wii.GetRawBalanceBoard(0).z.ToString();
        d.text = Wii.GetRawBalanceBoard(0).w.ToString();

/*    Returns a Vector 2 representing the distribution of weight on the balance board.
 *     The x-value represents the difference in weight between the right and left sides.
 *     The y-value represents the difference in weight between the front and back sides.
 *    If there is no weight or the weight is evenly distributed, Vector2.zero is returned. */

        e.text = Wii.GetCenterOfBalance(0).x.ToString();
        f.text = Wii.GetCenterOfBalance(0).y.ToString();

        DBManager.rl_balance = Wii.GetCenterOfBalance(0).x;
        DBManager.fb_balance = Wii.GetCenterOfBalance(0).y;

        balance.text = ((Wii.GetCenterOfBalance(0).x + Wii.GetCenterOfBalance(0).y) / 2).ToString();

        //     Returns the total weight on the balance board in kilograms.

        h.text = Wii.GetTotalWeight(0).ToString();
    }
コード例 #12
0
    /// <summary>
    /// Records the data from a trial
    /// </summary>
    /// <param name="caught"></param>Whether or not the fruit was caught
    /// <param name="timeSinceSpawned"></param>The time that the fruit spent active
    private void ResetTrial(bool caught, float timeSinceSpawned)
    {
        GlobalControl gc = GlobalControl.Instance;

        GetComponent <DataHandler>().recordTrial(Time.time, trialNum, score, timeSinceSpawned, caught,
                                                 CoPtoCM(Wii.GetCenterOfBalance(0)), gc.spawnDifficulty, gc.userSize, gc.fallSpeed,
                                                 gc.userSensitivity, gc.fruitSize, gc.trialLength);

        // Adjust the game parameters slightly for variation
        gc.userSize        = gc.PickAppropriateDifficulty(gc.userSize);
        gc.fallSpeed       = gc.PickAppropriateDifficulty(gc.fallSpeed);
        gc.userSensitivity = gc.PickAppropriateDifficulty(gc.userSensitivity);
        gc.fruitSize       = gc.PickAppropriateDifficulty(gc.fruitSize);
        gc.trialLength     = gc.PickAppropriateDifficulty(gc.trialLength);
        // Tell the basket that the game parameters changed
        basket.GetComponent <Basket>().ResizeBasket();
        basket.GetComponent <Basket>().AdjustSensitivity();
        SetTrialLength();

        trialNum++;
    }
コード例 #13
0
 void Update()
 {
     for (int i = 0; i < Wii.GetRemoteCount(); ++i)
     {
         if (Wii.IsActive(i) && Wii.GetExpType(i) == 3)
         {
             Vector4 theBalanceBoard = Wii.GetBalanceBoard(i);
             Vector2 theCenter       = Wii.GetCenterOfBalance(i);
             float   topWeight       = theBalanceBoard.x + theBalanceBoard.y;
             float   bottomWeight    = theBalanceBoard.z + theBalanceBoard.w;
             float   totalWeight     = Wii.GetTotalWeight(i);
             float   topBottomDiff   = topWeight - bottomWeight;
             bool    beforeIsRide    = IsRide;
             IsRide = totalWeight > RideThreasoldWeight;
             if (IsRide)
             {
                 if (OnRidingWeightSreeem != null)
                 {
                     OnRidingWeightSreeem(theCenter, theBalanceBoard);
                 }
                 ResetGameTimeSecond = 0f;
                 if (Mathf.Abs(topBottomDiff) > (totalWeight * TriggerThreasoldRate))
                 {
                     if (topBottomDiff > 0)
                     {
                     }
                     else
                     {
                     }
                 }
                 else
                 {
                 }
             }
             break;
         }
     }
 }
コード例 #14
0
 void Update()
 {
     for (int i = 0; i < Wii.GetRemoteCount(); ++i)
     {
         if (Wii.IsActive(i) && Wii.GetExpType(i) == 3)
         {
             // 乗っていないのなら以降の処理はやらない
             if (RideThreasoldWeight > Wii.GetTotalWeight(i))
             {
                 if (isRide)
                 {
                     characterAnimator.SetTrigger("Idle");
                 }
                 isRide = false;
                 return;
             }
             if (!isRide)
             {
                 characterAnimator.SetTrigger("Walk");
                 isRide = true;
             }
             // WiiFitの重心の方向にCharacterを向かせる
             Vector2 theCenter = Wii.GetCenterOfBalance(i);
             Vector3 currentCharacterPosition = characterObject.transform.position;
             Vector3 willNormalizedPosition   = new Vector3(currentCharacterPosition.x + theCenter.x, currentCharacterPosition.y, currentCharacterPosition.z + theCenter.y);
             characterObject.transform.LookAt(willNormalizedPosition);
             // Characterが向いている方向に1歩を踏み出すことで移動できる
             characterObject.transform.position = currentCharacterPosition + ((characterObject.transform.forward * Time.deltaTime * (willNormalizedPosition - currentCharacterPosition).sqrMagnitude) * MoveSpeedRate);
             if (relationalMoveCamera != null)
             {
                 relationalMoveCamera.transform.position += (characterObject.transform.position - currentCharacterPosition);
             }
             break;
         }
     }
 }
コード例 #15
0
 // Update is called once per frame
 void Update()
 {
     recordContinuous(Time.time, CoPtoCM(Wii.GetCenterOfBalance(0)));
 }
コード例 #16
0
    /// <summary>
    /// Check for new calibration maximums and update GUI. Also checks for key input from operator.
    /// Press left mouse button to record shoulder height and arm length, and press space to move
    /// onto next scene (only allowed if shoulder height and arm length have been recorded).
    /// </summary>
    void Update()
    {
        // - - - - - COB CALIBRATION - - - - -
        Vector2 posn = Task.CoPtoCM(Wii.GetCenterOfBalance(0));

        if (posn.x > rightMax)
        {
            rightMax = posn.x;
        }

        if (posn.x < leftMax)
        {
            leftMax = posn.x;
        }

        if (posn.y > forwardMax)
        {
            forwardMax = posn.y;
        }

        if (posn.y < backwardsMax)
        {
            backwardsMax = posn.y;
        }

        // - - - - SIDE REACH CALIBRATION - - - -
        Vector3 posn3;

        // get controller position
        if (GlobalControl.Instance.rightHanded)
        {
            posn3 = rightHand.transform.position;
        }
        else
        {
            posn3 = leftHand.transform.position;
        }

        // check to see if it is a new maximum
        if (posn3.x > rightReach)
        {
            rightReach = posn3.x;
        }
        else if (posn3.x < leftReach)
        {
            leftReach = posn3.x;
        }

        forwardText.text  = forwardMax.ToString();
        backwardText.text = backwardsMax.ToString();
        rightText.text    = rightMax.ToString();
        leftText.text     = leftMax.ToString();

        if (Input.GetMouseButtonUp(0))
        {
            this.CaptureArmLengthShoulderHeight();
        }

        // Handle any changes to GUI
        COB.GetComponent <RectTransform>().position = new Vector3(canvasOffset.x + posn.x * 0.2f, canvasOffset.y + posn.y * 0.2f, canvasOffset.z);

        // horizontal bars
        forwardImg.GetComponent <RectTransform>().position   = new Vector3(canvasOffset.x, canvasOffset.y + forwardMax * 0.2f, canvasOffset.z);
        backwardsImg.GetComponent <RectTransform>().position = new Vector3(canvasOffset.x, canvasOffset.y + backwardsMax * 0.2f, canvasOffset.z);

        // vertical bars
        leftImg.GetComponent <RectTransform>().position  = new Vector3(canvasOffset.x + leftMax * 0.2f, canvasOffset.y, canvasOffset.z);
        rightImg.GetComponent <RectTransform>().position = new Vector3(canvasOffset.x + rightMax * 0.2f, canvasOffset.y, canvasOffset.z);

        // text
        forwardText.GetComponent <RectTransform>().position  = forwardImg.GetComponent <RectTransform>().position;
        backwardText.GetComponent <RectTransform>().position = backwardsImg.GetComponent <RectTransform>().position;
        rightText.GetComponent <RectTransform>().position    = rightImg.GetComponent <RectTransform>().position;
        leftText.GetComponent <RectTransform>().position     = leftImg.GetComponent <RectTransform>().position;

        // Press space to load scene -- only go onto next scene if armLen has been calibrated
        if (Input.GetKeyDown(KeyCode.Space) && !float.IsNaN(armLen))
        {
            SaveData(); // Save data to GameControl

            SceneManager.LoadScene("Task");
        }
    }
コード例 #17
0
    /// <summary>
    /// Run trials.
    /// </summary>
    void FixedUpdate()
    {
        if (!begun)
        {
            if (Input.GetKeyUp(KeyCode.C))
            {
                begun = true;

                // Calibrate where the hand is when the user isn't reaching
                handAtSidePosition = GetCorrectHand().transform.position;

                //Set up either the stationary target or the rotating target
                rend = SetUpTargetsAndRenderer();

                chooseTrialType();
                chooseNextTarget();
                placeTarget();

                // get starting posn
                lastPosn = CoPtoCM(Wii.GetCenterOfBalance(0));
            }
            return;
        }

        ikRecording.AddJointData(time);

        if (gameOver)
        {
            // Game is over, make targets inactive and check
            // to see if space was pressed to restart scene.
            rotationObj.SetActive(false);
            target.SetActive(false);
            if (Input.GetKeyUp(KeyCode.Space))
            {
                SceneManager.LoadScene("Menu");
            }
            else
            {
                // The game is over, don't run any of the following code.
                return;
            }
        }

        time += Time.deltaTime;

        // tick up clock
        curTime += Time.deltaTime;

        // get position
        Vector2 posn = CoPtoCM(Wii.GetCenterOfBalance(0));

        // for data recording total distance of weight shift per target
        calculateDistances(posn);

        UpdateContinuousData(posn);

        // check to see if color of target should change
        checkPosn(posn);

        if (curTime < timePerTarget)
        {
            if (targets[targetIndex].indication == Target.posnIndicator.GREEN)
            {
                // Target is unlocked, check to see if player hit it
                CheckCollisions(posn);
                // CheckLockedCollisions(); // EW testing
            }
            else
            {
                // Target is still locked, check to see if player touched
                // it to give light haptic feedback
                CheckLockedCollisions();
            }

            // EW testing
            if (Input.GetKeyUp(KeyCode.T))
            {
                float distanceFromCenter = findPointDistanceFromCenter(Vector3.zero);
                float targetScore        = Target.ScoreTouch3(distanceFromCenter, curTime);
                Debug.Log("got score for target: " + targetScore);
                trialScore += targetScore;
                touched     = true;
                GetComponent <SoundEffectPlayer>().PlaySuccessSound();
                TriggerSuccessParticles();
                VibrateActiveController();
                ResetTarget(CoPtoCM(Wii.GetCenterOfBalance(0)));
            }
        }
        else
        {
            // failed to hit target in time
            GetComponent <SoundEffectPlayer>().PlayFailSound();
            TriggerFailParticles();
            ResetTarget(posn);
        }
    }
コード例 #18
0
 // Records continuous data into the data list
 private void recordContinuousTrial(float time, int trialNum, Vector3 ballPosition, Vector3 wristPosition, Vector3 armPosition)
 {
     continuousData.Add(new ContinuousData(time, trialNum, ballPosition, CoPtoCM(Wii.GetCenterOfBalance(0)), wristPosition, armPosition));
 }
コード例 #19
0
    // Update is called once per frame
    void Update()
    {
        totalRemotes = Wii.GetRemoteCount();

        theRemoteNumber.text = "Remote on Display:" + (whichRemote + 1).ToString();

        for (var x = 0; x < 16; x++)
        {
            if (Wii.IsActive(x))
            {
                //remote button visible or not?
                selectButtons[x].interactable = true;
            }
            else
            {
                selectButtons[x].interactable = false;
            }
        }

        if (Wii.IsActive(whichRemote))
        {
            dropButton.SetActive(true);

            if (Wii.HasMotionPlus(whichRemote))
            {
                //deactivate motion plus
                deactivateMotionButton.SetActive(true);
                detectMotionButton.SetActive(false);

                if (Wii.IsMotionPlusCalibrated(whichRemote))
                {
                    Debug.Log("motion plus is calibrated");
                    //uncalibrate motion plus
                    uncalibrateMotionButton.SetActive(true);
                    calibrateMotionButton.SetActive(false);
                }
                else
                {
                    Debug.Log("motion plus is uncalibrated");
                    uncalibrateMotionButton.SetActive(false);
                    calibrateMotionButton.SetActive(true);
                    //calibrate motion plus
                }
            }
            else
            {
                calibrateMotionButton.SetActive(false);
                uncalibrateMotionButton.SetActive(false);
                deactivateMotionButton.SetActive(false);
                detectMotionButton.SetActive(true);
                //check for motion plus
            }


            theRemoteNumber.enabled = true;
            var inputDisplay = "";
            inputDisplay = inputDisplay + "Remote #" + whichRemote.ToString();
            inputDisplay = inputDisplay + "\nbattery " + Wii.GetBattery(whichRemote).ToString();

            if (Wii.GetExpType(whichRemote) == 3)         //balance board is in is in
            {
                balanceBoard.gameObject.SetActive(true);
                wiimote.gameObject.SetActive(false);

                Vector4 theBalanceBoard = Wii.GetBalanceBoard(whichRemote);
                Vector2 theCenter       = Wii.GetCenterOfBalance(whichRemote);
                //Debug.Log(theBalanceBoard+" "+theCenter);
                balanceTopLeft.localScale     = new Vector3(balanceTopLeft.localScale.x, 1f - (.01f * theBalanceBoard.y), balanceTopLeft.localScale.z);
                balanceTopRight.localScale    = new Vector3(balanceTopRight.localScale.x, 1f - (.01f * theBalanceBoard.x), balanceTopRight.localScale.z);
                balanceBottomLeft.localScale  = new Vector3(balanceBottomLeft.localScale.x, 1f - (.01f * theBalanceBoard.w), balanceBottomLeft.localScale.z);
                balanceBottomRight.localScale = new Vector3(balanceBottomRight.localScale.x, 1f - (.01f * theBalanceBoard.z), balanceBottomRight.localScale.z);

                theIR1.position  = new Vector2(Screen.width / 2 - (Screen.width / 4), Screen.height / 2 + (Screen.height / 4));
                theIR1.sizeDelta = new Vector2(10, 10);

                theIR2.position  = new Vector2(Screen.width / 2 + (Screen.width / 4), Screen.height / 2 + (Screen.height / 4));
                theIR2.sizeDelta = new Vector2(10, 10);

                theIR3.position  = new Vector2(Screen.width / 2 - (Screen.width / 4), Screen.height / 2 - (Screen.height / 4));
                theIR3.sizeDelta = new Vector2(10, 10);

                theIR4.position  = new Vector2(Screen.width / 2 + (Screen.width / 4), Screen.height / 2 - (Screen.height / 4));
                theIR4.sizeDelta = new Vector2(10, 10);

                theIRMain.position  = new Vector2((Screen.width / 2) + (theCenter.x * (Screen.width / 4)), (Screen.height / 2) + (theCenter.y * Screen.height / 4));
                theIRMain.sizeDelta = new Vector2(50, 50);

                inputDisplay = inputDisplay + "\nBALANCE BOARD";
                inputDisplay = inputDisplay + "\ntotal Weight " + Wii.GetTotalWeight(whichRemote) + "kg";
                inputDisplay = inputDisplay + "\ntopRight     " + theBalanceBoard.x + "kg";
                inputDisplay = inputDisplay + "\ntopLeft      " + theBalanceBoard.y + "kg";
                inputDisplay = inputDisplay + "\nbottomRight  " + theBalanceBoard.z + "kg";
                inputDisplay = inputDisplay + "\nbottomLeft   " + theBalanceBoard.w + "kg";
            }
            else
            {
                ///WIIREMOTE
                wiimote.gameObject.SetActive(true);
                Vector3[] pointerArray = Wii.GetRawIRData(whichRemote);
                Vector2   mainPointer  = Wii.GetIRPosition(whichRemote);
                Vector3   wiiAccel     = Wii.GetWiimoteAcceleration(whichRemote);

                theIRMain.position  = new Vector2(mainPointer.x * Screen.width, mainPointer.y * Screen.height);
                theIRMain.sizeDelta = new Vector2(50, 50);
                float sizeScale = 5.0f;

                theIRMain.position  = new Vector2(mainPointer.x * Screen.width, mainPointer.y * Screen.height);
                theIRMain.sizeDelta = new Vector2(50, 50);

                theIR1.position = new Vector2(pointerArray[0].x * Screen.width - (pointerArray[0].z * sizeScale / 2.0f),
                                              pointerArray[0].y * Screen.height - (pointerArray[0].z * sizeScale / 2.0f));
                theIR1.sizeDelta = new Vector2(pointerArray[0].z * sizeScale * 10, pointerArray[0].z * sizeScale * 10);

                theIR2.position = new Vector2(pointerArray[1].x * Screen.width - (pointerArray[1].z * sizeScale / 2.0f),
                                              pointerArray[1].y * Screen.height - (pointerArray[1].z * sizeScale / 2.0f));
                theIR2.sizeDelta = new Vector2(pointerArray[1].z * sizeScale * 10, pointerArray[1].z * sizeScale * 10);

                theIR3.position = new Vector2(pointerArray[2].x * Screen.width - (pointerArray[2].z * sizeScale / 2.0f),
                                              pointerArray[2].y * Screen.height - (pointerArray[2].z * sizeScale / 2.0f));
                theIR3.sizeDelta = new Vector2(pointerArray[2].z * sizeScale * 10, pointerArray[2].z * sizeScale * 10);

                theIR4.position = new Vector2(pointerArray[3].x * Screen.width - (pointerArray[3].z * sizeScale / 2.0f),
                                              pointerArray[3].y * Screen.height - (pointerArray[3].z * sizeScale / 2.0f));
                theIR4.sizeDelta = new Vector2(pointerArray[3].z * sizeScale * 10, pointerArray[3].z * sizeScale * 10);

                wiimote.localRotation = Quaternion.Slerp(transform.localRotation,
                                                         Quaternion.Euler(wiiAccel.y * 90.0f, 0.0f, wiiAccel.x * -90.0f), 5.0f);

                if (Wii.GetButton(whichRemote, "A"))
                {
                    buttonA.SetActive(true);
                }
                else
                {
                    buttonA.SetActive(false);
                }
                if (Wii.GetButton(whichRemote, "B"))
                {
                    buttonB.SetActive(true);
                }
                else
                {
                    buttonB.SetActive(false);
                }
                if (Wii.GetButton(whichRemote, "UP"))
                {
                    buttonUp.SetActive(true);
                }
                else
                {
                    buttonUp.SetActive(false);
                }
                if (Wii.GetButton(whichRemote, "DOWN"))
                {
                    buttonDown.SetActive(true);
                }
                else
                {
                    buttonDown.SetActive(false);
                }
                if (Wii.GetButton(whichRemote, "LEFT"))
                {
                    buttonLeft.SetActive(true);
                }
                else
                {
                    buttonLeft.SetActive(false);
                }
                if (Wii.GetButton(whichRemote, "RIGHT"))
                {
                    buttonRight.SetActive(true);
                }
                else
                {
                    buttonRight.SetActive(false);
                }
                if (Wii.GetButton(whichRemote, "MINUS"))
                {
                    buttonMinus.SetActive(true);
                }
                else
                {
                    buttonMinus.SetActive(false);
                }
                if (Wii.GetButton(whichRemote, "PLUS"))
                {
                    buttonPlus.SetActive(true);
                }
                else
                {
                    buttonPlus.SetActive(false);
                }
                if (Wii.GetButton(whichRemote, "HOME"))
                {
                    buttonHome.SetActive(true);
                }
                else
                {
                    buttonHome.SetActive(false);
                }
                if (Wii.GetButton(whichRemote, "ONE"))
                {
                    buttonOne.SetActive(true);
                }
                else
                {
                    buttonOne.SetActive(false);
                }
                if (Wii.GetButton(whichRemote, "TWO"))
                {
                    buttonTwo.SetActive(true);
                }
                else
                {
                    buttonTwo.SetActive(false);
                }

                inputDisplay = inputDisplay + "\nIR      " + Wii.GetIRPosition(whichRemote).ToString("#.0000");
                inputDisplay = inputDisplay + "\nIR rot  " + Wii.GetIRRotation(whichRemote).ToString();
                inputDisplay = inputDisplay + "\nA       " + Wii.GetButton(whichRemote, "A").ToString();
                inputDisplay = inputDisplay + "\nB       " + Wii.GetButton(whichRemote, "B").ToString();
                inputDisplay = inputDisplay + "\n1       " + Wii.GetButton(whichRemote, "1").ToString();
                inputDisplay = inputDisplay + "\n2       " + Wii.GetButton(whichRemote, "2").ToString();
                inputDisplay = inputDisplay + "\nUp      " + Wii.GetButton(whichRemote, "UP").ToString();
                inputDisplay = inputDisplay + "\nDown    " + Wii.GetButton(whichRemote, "DOWN").ToString();
                inputDisplay = inputDisplay + "\nLeft    " + Wii.GetButton(whichRemote, "LEFT").ToString();
                inputDisplay = inputDisplay + "\nRight   " + Wii.GetButton(whichRemote, "RIGHT").ToString();
                inputDisplay = inputDisplay + "\n-       " + Wii.GetButton(whichRemote, "-").ToString();
                inputDisplay = inputDisplay + "\n+       " + Wii.GetButton(whichRemote, "+").ToString();
                inputDisplay = inputDisplay + "\nHome    " + Wii.GetButton(whichRemote, "HOME").ToString();
                inputDisplay = inputDisplay + "\nAccel   " + Wii.GetWiimoteAcceleration(whichRemote).ToString("#.0000");

                Debug.Log(whichRemote);
                Debug.Log(Wii.GetWiimoteAcceleration(whichRemote));

                if (Wii.HasMotionPlus(whichRemote))
                {
                    motionPlus.gameObject.SetActive(true);
                    Vector3 motion = Wii.GetMotionPlus(whichRemote);
                    if (Input.GetKeyDown("space") || Wii.GetButtonDown(whichRemote, "HOME"))
                    {
                        motionPlus.localRotation = Quaternion.identity;
                    }
                    motionPlus.RotateAround(motionPlus.position, motionPlus.right, motion.x);
                    motionPlus.RotateAround(motionPlus.position, motionPlus.up, -motion.y);
                    motionPlus.RotateAround(motionPlus.position, motionPlus.forward, motion.z);

                    Debug.Log(motionPlus.rotation.x);
                    Debug.Log(motionPlus.rotation.y);
                    Debug.Log(motionPlus.rotation.z);

                    inputDisplay = inputDisplay + "\nMotion+ " + motion.ToString("#.0000");
                    inputDisplay = inputDisplay + "\nYAW FAST " + Wii.IsYawFast(whichRemote);
                    inputDisplay = inputDisplay + "\nROLL FAST " + Wii.IsRollFast(whichRemote);
                    inputDisplay = inputDisplay + "\nPITCH FAST " + Wii.IsPitchFast(whichRemote);
                }
                else
                {
                    motionPlus.gameObject.SetActive(false);
                }

                if (Wii.GetExpType(whichRemote) == 1)             //nunchuck is in
                {
                    nunchuk.gameObject.SetActive(true);
                    nunchuk.localRotation = Quaternion.Slerp(transform.localRotation,
                                                             Quaternion.Euler(Wii.GetNunchuckAcceleration(whichRemote).y * 90.0f,
                                                                              0.0f,
                                                                              Wii.GetNunchuckAcceleration(whichRemote).x *-90f),
                                                             5.0f);

                    nunchuckStick.rotation = nunchuk.rotation;
                    nunchuckStick.RotateAround(nunchuckStick.position, nunchuckStick.right, Wii.GetAnalogStick(whichRemote).y *30.0f);
                    nunchuckStick.RotateAround(nunchuckStick.position, nunchuckStick.forward, Wii.GetAnalogStick(whichRemote).x *-30.0f);

                    if (Wii.GetButton(whichRemote, "C"))
                    {
                        buttonC.SetActive(true);
                    }
                    else
                    {
                        buttonC.SetActive(false);
                    }
                    if (Wii.GetButton(whichRemote, "Z"))
                    {
                        buttonZ.SetActive(true);
                    }
                    else
                    {
                        buttonZ.SetActive(false);
                    }

                    inputDisplay = inputDisplay + "\nNUNCHUCK";
                    inputDisplay = inputDisplay + "\nC       " + Wii.GetButton(whichRemote, "C").ToString();
                    inputDisplay = inputDisplay + "\nZ       " + Wii.GetButton(whichRemote, "Z").ToString();
                    inputDisplay = inputDisplay + "\nnunchuckStick N " + Wii.GetAnalogStick(whichRemote).ToString("#.0000");
                    inputDisplay = inputDisplay + "\nAccel N " + Wii.GetNunchuckAcceleration(whichRemote).ToString("#.0000");
                }
                else if (Wii.GetExpType(whichRemote) == 2)             //classic controller is in
                {
                    classic.gameObject.SetActive(true);
                    Vector2 theStickLeft  = Wii.GetAnalogStick(whichRemote, "CLASSICLEFT");
                    Vector2 theStickRight = Wii.GetAnalogStick(whichRemote, "CLASSICRIGHT");

                    classicStickLeft.rotation = classic.rotation;
                    classicStickLeft.RotateAround(classicStickLeft.position, transform.right,
                                                  theStickLeft.y * 30.0f);
                    classicStickLeft.RotateAround(classicStickLeft.position, transform.forward,
                                                  theStickLeft.x * -30.0f);

                    classicStickRight.rotation = classic.rotation;
                    classicStickRight.RotateAround(classicStickRight.position, transform.right,
                                                   theStickRight.y * 30.0f);
                    classicStickRight.RotateAround(classicStickRight.position, transform.forward,
                                                   theStickRight.x * -30.0f);

                    buttonClassicL.transform.localScale = new Vector3(4.0f * Wii.GetAnalogButton(whichRemote, "CLASSICL"), buttonClassicL.transform.localScale.y, buttonClassicL.transform.localScale.z);
                    buttonClassicR.transform.localScale = new Vector3(4.0f * Wii.GetAnalogButton(whichRemote, "CLASSICR"), buttonClassicL.transform.localScale.y, buttonClassicL.transform.localScale.z);

                    buttonClassicA.SetActive(Wii.GetButton(whichRemote, "CLASSICA"));
                    buttonClassicB.SetActive(Wii.GetButton(whichRemote, "CLASSICB"));
                    buttonClassicMinus.SetActive(Wii.GetButton(whichRemote, "CLASSICMINUS"));
                    buttonClassicPlus.SetActive(Wii.GetButton(whichRemote, "CLASSICPLUS"));
                    buttonClassicHome.SetActive(Wii.GetButton(whichRemote, "CLASSICHOME"));
                    buttonClassicX.SetActive(Wii.GetButton(whichRemote, "CLASSICX"));
                    buttonClassicY.SetActive(Wii.GetButton(whichRemote, "CLASSICY"));
                    buttonClassicUp.SetActive(Wii.GetButton(whichRemote, "CLASSICUP"));
                    buttonClassicDown.SetActive(Wii.GetButton(whichRemote, "CLASSICDOWN"));
                    buttonClassicLeft.SetActive(Wii.GetButton(whichRemote, "CLASSICLEFT"));
                    buttonClassicRight.SetActive(Wii.GetButton(whichRemote, "CLASSICRIGHT"));
                    buttonClassicL.SetActive(Wii.GetButton(whichRemote, "CLASSICL"));
                    buttonClassicR.SetActive(Wii.GetButton(whichRemote, "CLASSICR"));
                    buttonClassicZL.SetActive(Wii.GetButton(whichRemote, "CLASSICZL"));
                    buttonClassicZR.SetActive(Wii.GetButton(whichRemote, "CLASSICZR"));

                    inputDisplay = inputDisplay + "\n CLASSIC";
                    inputDisplay = inputDisplay + "\na       " + Wii.GetButton(whichRemote, "CLASSICA").ToString();
                    inputDisplay = inputDisplay + "\nb       " + Wii.GetButton(whichRemote, "CLASSICB").ToString();
                    inputDisplay = inputDisplay + "\n-       " + Wii.GetButton(whichRemote, "CLASSICMINUS").ToString();
                    inputDisplay = inputDisplay + "\n+       " + Wii.GetButton(whichRemote, "CLASSICPLUS").ToString();
                    inputDisplay = inputDisplay + "\nhome    " + Wii.GetButton(whichRemote, "CLASSICHOME").ToString();
                    inputDisplay = inputDisplay + "\nx       " + Wii.GetButton(whichRemote, "CLASSICX").ToString();
                    inputDisplay = inputDisplay + "\ny       " + Wii.GetButton(whichRemote, "CLASSICY").ToString();
                    inputDisplay = inputDisplay + "\nup      " + Wii.GetButton(whichRemote, "CLASSICUP").ToString();
                    inputDisplay = inputDisplay + "\ndown    " + Wii.GetButton(whichRemote, "CLASSICDOWN").ToString();
                    inputDisplay = inputDisplay + "\nleft    " + Wii.GetButton(whichRemote, "CLASSICLEFT").ToString();
                    inputDisplay = inputDisplay + "\nright   " + Wii.GetButton(whichRemote, "CLASSICRIGHT").ToString();
                    inputDisplay = inputDisplay + "\nL       " + Wii.GetButton(whichRemote, "CLASSICL").ToString();
                    inputDisplay = inputDisplay + " " + Wii.GetAnalogButton(whichRemote, "CLASSICL").ToString("#.000");
                    inputDisplay = inputDisplay + "\nR       " + Wii.GetButton(whichRemote, "CLASSICR").ToString();
                    inputDisplay = inputDisplay + " " + Wii.GetAnalogButton(whichRemote, "CLASSICR").ToString("#.000");
                    inputDisplay = inputDisplay + "\nZL      " + Wii.GetButton(whichRemote, "CLASSICZL").ToString();
                    inputDisplay = inputDisplay + "\nZR      " + Wii.GetButton(whichRemote, "CLASSICZR").ToString();
                    inputDisplay = inputDisplay + "\nStick L " + theStickLeft.ToString("#.0000");
                    inputDisplay = inputDisplay + "\nStick R " + theStickRight.ToString("#.0000");
                }
                else if (Wii.GetExpType(whichRemote) == 4)             //guitar is in
                {
                    guitarBody.gameObject.SetActive(true);
                    var theStick  = Wii.GetAnalogStick(whichRemote, "GUITAR");
                    var theWhammy = Wii.GetGuitarWhammy(whichRemote);
                    var theStrum  = Wii.GetGuitarStrum(whichRemote);


                    buttonGuitarGreen.SetActive(Wii.GetButton(whichRemote, "GUITARGREEN"));
                    buttonGuitarRed.SetActive(Wii.GetButton(whichRemote, "GUITARRED"));
                    buttonGuitarYellow.SetActive(Wii.GetButton(whichRemote, "GUITARYELLOW"));
                    buttonGuitarBlue.SetActive(Wii.GetButton(whichRemote, "GUITARBLUE"));
                    buttonGuitarOrange.SetActive(Wii.GetButton(whichRemote, "GUITARORANGE"));
                    buttonGuitarPlus.SetActive(Wii.GetButton(whichRemote, "GUITARPLUS"));
                    buttonGuitarMinus.SetActive(Wii.GetButton(whichRemote, "GUITARMINUS"));

                    guitarBody.localRotation = Quaternion.Euler(0, 0, 0);
                    guitarBody.RotateAround(guitarBody.position, guitarBody.forward, wiiAccel.x * 90.0f);

                    theStick             = Wii.GetAnalogStick(whichRemote, "GUITAR");
                    guitarStick.rotation = guitarBody.rotation;
                    guitarStick.RotateAround(guitarStick.position, guitarStick.up, theStick.y * 30.0f);
                    guitarStick.RotateAround(guitarStick.position, guitarStick.right, theStick.x * -30.0f);


                    guitarStrum.rotation = guitarBody.rotation;
                    guitarStrum.RotateAround(guitarStrum.position, guitarStrum.up, 20.0f * Wii.GetGuitarStrum(whichRemote));
                    guitarWhammy.rotation = guitarBody.rotation;
                    guitarWhammy.RotateAround(guitarWhammy.position, guitarWhammy.right, 20.0f * Wii.GetGuitarWhammy(whichRemote));

                    inputDisplay = inputDisplay + "\n GUITAR";
                    inputDisplay = inputDisplay + "\nGreen  " + Wii.GetButton(whichRemote, "GUITARGREEN").ToString();
                    inputDisplay = inputDisplay + "\nRed    " + Wii.GetButton(whichRemote, "GUITARRED").ToString();
                    inputDisplay = inputDisplay + "\nYellow " + Wii.GetButton(whichRemote, "GUITARYELLOW").ToString();
                    inputDisplay = inputDisplay + "\nBlue   " + Wii.GetButton(whichRemote, "GUITARBLUE").ToString();
                    inputDisplay = inputDisplay + "\nOrange " + Wii.GetButton(whichRemote, "GUITARORANGE").ToString();
                    inputDisplay = inputDisplay + "\nPlus   " + Wii.GetButton(whichRemote, "GUITARPLUS").ToString();
                    inputDisplay = inputDisplay + "\nMinus  " + Wii.GetButton(whichRemote, "GUITARMINUS").ToString();
                    inputDisplay = inputDisplay + "\nStick  " + theStick.ToString("#.0000");
                    inputDisplay = inputDisplay + "\nWhammy " + theWhammy.ToString("#.0000");
                    inputDisplay = inputDisplay + "\nStrum  " + theStrum.ToString();
                }
                else if (Wii.GetExpType(whichRemote) == 5)             //drums are in
                {
                    drumSet.gameObject.SetActive(true);
                    Vector2 theStick = Wii.GetAnalogStick(whichRemote, "DRUMS");
                    drumStick.rotation = drumSet.rotation;
                    drumStick.RotateAround(drumStick.position, drumStick.right,
                                           theStick.y * 30.0f);
                    drumStick.RotateAround(drumStick.position, drumStick.forward,
                                           theStick.x * -30.0f);

                    drumPlus.enabled  = Wii.GetButton(whichRemote, "DRUMPLUS");
                    drumMinus.enabled = Wii.GetButton(whichRemote, "DRUMMINUS");

                    if (Wii.GetButton(whichRemote, "DRUMGREEN"))
                    {
                        float boom = 1.5f / Wii.GetDrumVelocity(whichRemote, "GREEN");
                        drumGreen.localScale = new Vector3(boom, drumGreen.localScale.y, boom);
                    }
                    else
                    {
                        float boom = Mathf.Lerp(drumGreen.localScale.x, 1.5f, .1f);
                        drumGreen.localScale = new Vector3(boom, drumGreen.localScale.y, boom);
                    }

                    if (Wii.GetButton(whichRemote, "DRUMBLUE"))
                    {
                        float boom = 1.5f / Wii.GetDrumVelocity(whichRemote, "BLUE");
                        drumBlue.localScale = new Vector3(boom, drumBlue.localScale.y, boom);
                    }
                    else
                    {
                        float boom = Mathf.Lerp(drumBlue.localScale.x, 1.5f, .1f);
                        drumBlue.localScale = new Vector3(boom, drumBlue.localScale.y, boom);
                    }

                    if (Wii.GetButton(whichRemote, "DRUMRED"))
                    {
                        float boom = 1.5f / Wii.GetDrumVelocity(whichRemote, "RED");
                        drumRed.localScale = new Vector3(boom, drumRed.localScale.y, boom);
                    }
                    else
                    {
                        float boom = Mathf.Lerp(drumRed.localScale.x, 1.5f, .1f);
                        drumRed.localScale = new Vector3(boom, drumRed.localScale.y, boom);
                    }

                    if (Wii.GetButton(whichRemote, "DRUMORANGE"))
                    {
                        float boom = 1.5f / Wii.GetDrumVelocity(whichRemote, "ORANGE");
                        drumOrange.localScale = new Vector3(boom, drumOrange.localScale.y, boom);
                    }
                    else
                    {
                        float boom = Mathf.Lerp(drumOrange.localScale.x, 1.5f, .1f);
                        drumOrange.localScale = new Vector3(boom, drumOrange.localScale.y, boom);
                    }

                    if (Wii.GetButton(whichRemote, "DRUMYELLOW"))
                    {
                        float boom = 1.5f / Wii.GetDrumVelocity(whichRemote, "YELLOW");
                        drumYellow.localScale = new Vector3(boom, drumYellow.localScale.y, boom);
                    }
                    else
                    {
                        float boom = Mathf.Lerp(drumYellow.localScale.x, 1.5f, .1f);
                        drumYellow.localScale = new Vector3(boom, drumYellow.localScale.y, boom);
                    }

                    inputDisplay = inputDisplay + "\n  DRUMS";
                    inputDisplay = inputDisplay + "\nGreen  " + Wii.GetButton(whichRemote, "DRUMGREEN").ToString();
                    inputDisplay = inputDisplay + "\nRed    " + Wii.GetButton(whichRemote, "DRUMRED").ToString();
                    inputDisplay = inputDisplay + "\nYellow " + Wii.GetButton(whichRemote, "DRUMYELLOW").ToString();
                    inputDisplay = inputDisplay + "\nBlue   " + Wii.GetButton(whichRemote, "DRUMBLUE").ToString();
                    inputDisplay = inputDisplay + "\nOrange " + Wii.GetButton(whichRemote, "DRUMORANGE").ToString();
                    inputDisplay = inputDisplay + "\nPlus   " + Wii.GetButton(whichRemote, "DRUMPLUS").ToString();
                    inputDisplay = inputDisplay + "\nMinus  " + Wii.GetButton(whichRemote, "DRUMMINUS").ToString();
                    inputDisplay = inputDisplay + "\nPedal  " + Wii.GetButton(whichRemote, "DRUMPEDAL").ToString();
                    inputDisplay = inputDisplay + "\nStick  " + theStick.ToString("#.0000");
                }
                else if (Wii.GetExpType(whichRemote) == 6)             //turntable is in
                {
                    Vector2 theStick = Wii.GetAnalogStick(whichRemote, "TURNTABLE");
                    hub.gameObject.SetActive(true);

                    dial.rotation = hub.rotation;
                    dial.RotateAround(dial.position, dial.up, 360.0f * Wii.GetTurntableDial(whichRemote));

                    slider.localPosition = new Vector3(.3f * Wii.GetTurntableSlider(whichRemote), slider.localPosition.y, slider.localPosition.z);


                    tableStick.rotation = hub.rotation;
                    tableStick.RotateAround(tableStick.position, tableStick.right,
                                            theStick.y * 30.0f);
                    tableStick.RotateAround(tableStick.position, tableStick.forward,
                                            theStick.x * -30.0f);

                    buttonTablePlus.SetActive(Wii.GetButton(whichRemote, "TURNTABLEPLUS"));
                    buttonTableMinus.SetActive(Wii.GetButton(whichRemote, "TURNTABLEMINUS"));
                    butttonEuphoria.SetActive(Wii.GetButton(whichRemote, "TURNTABLEEUPHORIA"));

                    platterLeft.RotateAround(platterLeft.position, platterLeft.up, Wii.GetTurntableSpin(whichRemote, "LEFT"));
                    platterRight.RotateAround(platterRight.position, platterRight.up, Wii.GetTurntableSpin(whichRemote, "RIGHT"));

                    tableLeftGreen.SetActive(Wii.GetButton(whichRemote, "TURNTABLEGREENLEFT"));
                    tableLeftRed.SetActive(Wii.GetButton(whichRemote, "TURNTABLEREDLEFT"));
                    tableLeftBlue.SetActive(Wii.GetButton(whichRemote, "TURNTABLEBLUELEFT"));
                    tableRightGreen.SetActive(Wii.GetButton(whichRemote, "TURNTABLEGREENRIGHT"));
                    tableRightRed.SetActive(Wii.GetButton(whichRemote, "TURNTABLEREDRIGHT"));
                    tableRightBlue.SetActive(Wii.GetButton(whichRemote, "TURNTABLEBLUERIGHT"));

                    inputDisplay = inputDisplay + "\nTURN TABLE";
                    inputDisplay = inputDisplay + "\nLeft Green  " + Wii.GetButton(whichRemote, "TURNTABLEGREENLEFT").ToString();
                    inputDisplay = inputDisplay + "\nLeft Red    " + Wii.GetButton(whichRemote, "TURNTABLEREDLEFT").ToString();
                    inputDisplay = inputDisplay + "\nLeft Blue   " + Wii.GetButton(whichRemote, "TURNTABLEBLUELEFT").ToString();
                    inputDisplay = inputDisplay + "\nRight Green   " + Wii.GetButton(whichRemote, "TURNTABLEGREENRIGHT").ToString();
                    inputDisplay = inputDisplay + "\nRight Red     " + Wii.GetButton(whichRemote, "TURNTABLEREDRIGHT").ToString();
                    inputDisplay = inputDisplay + "\nRight Blue    " + Wii.GetButton(whichRemote, "TURNTABLEBLUERIGHT").ToString();
                    inputDisplay = inputDisplay + "\nEuphoria    " + Wii.GetButton(whichRemote, "TURNTABLEEUPHORIA").ToString();                                                                                                                               inputDisplay = inputDisplay + "\nPlus        " + Wii.GetButton(whichRemote, "TURNTABLEPLUS").ToString();
                    inputDisplay = inputDisplay + "\nMinus       " + Wii.GetButton(whichRemote, "TURNTABLEMINUS").ToString();
                    inputDisplay = inputDisplay + "\nStick       " + theStick.ToString("#.0000");
                    inputDisplay = inputDisplay + "\nSlider      " + Wii.GetTurntableSlider(whichRemote);
                    inputDisplay = inputDisplay + "\nDial        " + Wii.GetTurntableDial(whichRemote);
                    inputDisplay = inputDisplay + "\nLeft Table  " + Wii.GetTurntableSpin(whichRemote, "LEFT");
                    inputDisplay = inputDisplay + "\nRight Table " + Wii.GetTurntableSpin(whichRemote, "RIGHT");;
                }
                else if (Wii.GetExpType(whichRemote) == 7)             //WiiUPro is in
                {
                    proU.gameObject.SetActive(true);
                    wiimote.gameObject.SetActive(false);

                    detectMotionButton.SetActive(false);
                    calibrateWiiUProButton.SetActive(true);
                    Vector2 theStickLeft  = Wii.GetAnalogStick(whichRemote, "WIIUPROLEFT");
                    Vector2 theStickRight = Wii.GetAnalogStick(whichRemote, "WIIUPRORIGHT");

                    proU.gameObject.SetActive(true);

                    proUStickLeft.rotation = proU.rotation;
                    proUStickLeft.RotateAround(proUStickLeft.position, transform.right,
                                               theStickLeft.y * 30.0f);
                    proUStickLeft.RotateAround(proUStickLeft.position, transform.forward,
                                               theStickLeft.x * -30.0f);

                    proUStickRight.rotation = proU.rotation;
                    proUStickRight.RotateAround(proUStickRight.position, transform.right,
                                                theStickRight.y * 30.0f);
                    proUStickRight.RotateAround(proUStickRight.position, transform.forward,
                                                theStickRight.x * -30.0f);

                    if (Wii.GetButton(whichRemote, "WIIUPROL3"))
                    {
                        proUStickLeft.localScale = new Vector3(proUStickLeft.localScale.x, 1.5f, proUStickLeft.localScale.z);
                    }
                    else
                    {
                        proUStickLeft.localScale = new Vector3(proUStickLeft.localScale.x, 2.3f, proUStickLeft.localScale.z);
                    }

                    if (Wii.GetButton(whichRemote, "WIIUPROR3"))
                    {
                        proUStickRight.localScale = new Vector3(proUStickRight.localScale.x, 1.5f, proUStickRight.localScale.z);
                    }
                    else
                    {
                        proUStickRight.localScale = new Vector3(proUStickRight.localScale.x, 2.3f, proUStickRight.localScale.z);
                    }

                    buttonProUA.SetActive(Wii.GetButton(whichRemote, "WIIUPROA"));
                    buttonProUB.SetActive(Wii.GetButton(whichRemote, "WIIUPROB"));
                    buttonProUMinus.SetActive(Wii.GetButton(whichRemote, "WIIUPROMINUS"));
                    buttonProUPlus.SetActive(Wii.GetButton(whichRemote, "WIIUPROPLUS"));
                    buttonProUHome.SetActive(Wii.GetButton(whichRemote, "WIIUPROHOME"));
                    buttonProUX.SetActive(Wii.GetButton(whichRemote, "WIIUPROX"));
                    buttonProUY.SetActive(Wii.GetButton(whichRemote, "WIIUPROY"));
                    buttonProUUp.SetActive(Wii.GetButton(whichRemote, "WIIUPROUP"));
                    buttonProUDown.SetActive(Wii.GetButton(whichRemote, "WIIUPRODOWN"));
                    buttonProULeft.SetActive(Wii.GetButton(whichRemote, "WIIUPROLEFT"));
                    buttonProURight.SetActive(Wii.GetButton(whichRemote, "WIIUPRORIGHT"));
                    buttonProUL.SetActive(Wii.GetButton(whichRemote, "WIIUPROL"));
                    buttonProUR.SetActive(Wii.GetButton(whichRemote, "WIIUPROR"));
                    buttonProUZL.SetActive(Wii.GetButton(whichRemote, "WIIUPROZL"));
                    buttonProUZR.SetActive(Wii.GetButton(whichRemote, "WIIUPROZR"));


                    inputDisplay = " WII U PRO ";
                    inputDisplay = inputDisplay + "\na       " + Wii.GetButton(whichRemote, "WIIUPROA").ToString();
                    inputDisplay = inputDisplay + "\nb       " + Wii.GetButton(whichRemote, "WIIUPROB").ToString();
                    inputDisplay = inputDisplay + "\n-       " + Wii.GetButton(whichRemote, "WIIUPROMINUS").ToString();
                    inputDisplay = inputDisplay + "\n+       " + Wii.GetButton(whichRemote, "WIIUPROPLUS").ToString();
                    inputDisplay = inputDisplay + "\nhome    " + Wii.GetButton(whichRemote, "WIIUPROHOME").ToString();
                    inputDisplay = inputDisplay + "\nx       " + Wii.GetButton(whichRemote, "WIIUPROX").ToString();
                    inputDisplay = inputDisplay + "\ny       " + Wii.GetButton(whichRemote, "WIIUPROY").ToString();
                    inputDisplay = inputDisplay + "\nup      " + Wii.GetButton(whichRemote, "WIIUPROUP").ToString();
                    inputDisplay = inputDisplay + "\ndown    " + Wii.GetButton(whichRemote, "WIIUPRODOWN").ToString();
                    inputDisplay = inputDisplay + "\nleft    " + Wii.GetButton(whichRemote, "WIIUPROLEFT").ToString();
                    inputDisplay = inputDisplay + "\nright   " + Wii.GetButton(whichRemote, "WIIUPRORIGHT").ToString();
                    inputDisplay = inputDisplay + "\nL       " + Wii.GetButton(whichRemote, "WIIUPROL").ToString();
                    inputDisplay = inputDisplay + "\nR       " + Wii.GetButton(whichRemote, "WIIUPROR").ToString();
                    inputDisplay = inputDisplay + "\nZL      " + Wii.GetButton(whichRemote, "WIIUPROZL").ToString();
                    inputDisplay = inputDisplay + "\nZR      " + Wii.GetButton(whichRemote, "WIIUPROZR").ToString();
                    inputDisplay = inputDisplay + "\nL3      " + Wii.GetButton(whichRemote, "WIIUPROL3").ToString();
                    inputDisplay = inputDisplay + "\nR3      " + Wii.GetButton(whichRemote, "WIIUPROR3").ToString();
                    inputDisplay = inputDisplay + "\nStick L " + theStickLeft.ToString("#.0000");
                    inputDisplay = inputDisplay + "\nStick R " + theStickRight.ToString("#.0000");
                }
                else if (Wii.GetExpType(whichRemote) == 0)
                {
                    nunchuk.gameObject.SetActive(false);
                    balanceBoard.gameObject.SetActive(false);
                    classic.gameObject.SetActive(false);
                    guitarBody.gameObject.SetActive(false);
                    hub.gameObject.SetActive(false);
                    drumSet.gameObject.SetActive(false);
                    proU.gameObject.SetActive(false);
                }
            }
            theText.text = inputDisplay;
        }
        else
        {
            dropButton.SetActive(false);

            nunchuk.gameObject.SetActive(false);
            balanceBoard.gameObject.SetActive(false);
            classic.gameObject.SetActive(false);
            guitarBody.gameObject.SetActive(false);
            hub.gameObject.SetActive(false);
            drumSet.gameObject.SetActive(false);
            wiimote.gameObject.SetActive(false);
            motionPlus.gameObject.SetActive(false);
            proU.gameObject.SetActive(false);

            calibrateWiiUProButton.SetActive(false);
            detectMotionButton.SetActive(false);
            calibrateMotionButton.SetActive(false);
            uncalibrateMotionButton.SetActive(false);
            deactivateMotionButton.SetActive(false);


            theRemoteNumber.enabled = false;
            theText.text            = "Ready.";
        }

        if (Wii.IsSearching())
        {
            //cancel search
            cancelButton.SetActive(true);
        }
        else
        {
            cancelButton.SetActive(false);
            if (!Wii.IsSearching() && (totalRemotes < 16))
            {
                //Find Button
                searchButton.SetActive(true);
            }
            else
            {
                searchButton.SetActive(false);
            }
        }
    }