using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Uduino;
using UnityEngine.XR;
using UnityEngine.XR.Interaction.Toolkit;


public class WristVer : MonoBehaviour
{
    public int servoPin = 5;
    [Range(0, 180)]
    public int servoAngle = 90;
    private int prevServoAngle = 90;
    
    

    void Start()
    {



    }

    void Update()
    {
        

        if (servoAngle != prevServoAngle) // Condition to not send data each frame 
        {
            UduinoManager.Instance.sendCommand("movewristver", servoAngle);
            prevServoAngle = servoAngle;
        }
    }
}