diff --git a/Assets/WRMHL/Scripts/wrmhlRead.cs b/Assets/WRMHL/Scripts/wrmhlRead.cs index 5b242ef..ddb073d 100644 --- a/Assets/WRMHL/Scripts/wrmhlRead.cs +++ b/Assets/WRMHL/Scripts/wrmhlRead.cs @@ -4,7 +4,7 @@ /* This script is used to read all the data coming from the device. For instance, -If arduino send -> +If arduino sends -> {"1", "2", "3",} @@ -13,7 +13,7 @@ If arduino send -> "2", for the second call "3", for the thirst call -This is the perfect script for integration that need to avoid data loose. +This is the perfect script for integrations that need to avoid data loss. If you need speed and low latency take a look to wrmhlReadLatest. */ @@ -35,17 +35,17 @@ public class wrmhlRead : MonoBehaviour { public int QueueLenght = 1; void Start () { - myDevice.set (portName, baudRate, ReadTimeout, QueueLenght); // This method set the communication with the following vars; - // Serial Port, Baud Rates, Read Timeout and QueueLenght. + myDevice.set (portName, baudRate, ReadTimeout, QueueLenght); // This method set the communication with the following vars: + // Serial Port, Baud Rates, Read Timeout and QueueLenght. myDevice.connect (); // This method open the Serial communication with the vars previously given. } // Update is called once per frame void Update () { - print (myDevice.readQueue () ); // myDevice.read() return the data coming from the device using thread. + print (myDevice.readQueue () ); // myDevice.read() returns the data coming from the device using thread. } - void OnApplicationQuit() { // close the Thread and Serial Port + void OnApplicationQuit() { // closes the Thread and Serial Port myDevice.close(); } } diff --git a/Assets/WRMHL/Scripts/wrmhlWrite.cs b/Assets/WRMHL/Scripts/wrmhlWrite.cs index ec8b83b..502aa9d 100644 --- a/Assets/WRMHL/Scripts/wrmhlWrite.cs +++ b/Assets/WRMHL/Scripts/wrmhlWrite.cs @@ -24,8 +24,8 @@ public class wrmhlWrite : MonoBehaviour { public int QueueLenght = 1; void Start () { - myDevice.set (portName, baudRate, ReadTimeout, QueueLenght); // This method set the communication with the following vars; - // Serial Port, Baud Rates, Read Timeout and QueueLenght. + myDevice.set (portName, baudRate, ReadTimeout, QueueLenght); // This method set the communication with the following vars: + // Serial Port, Baud Rates, Read Timeout and QueueLenght. myDevice.connect (); // This method open the Serial communication with the vars previously given. }