You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using UnityEngine;
using System.Collections;
using UnityEditor;
/**
Sample for reading using polling by yourself, and writing too.
*/
public class SampleUserPolling_ReadWrite : MonoBehaviour
{
public SerialController serialController;
public string speed;
On the receiving end, your numbers will be strings, so you need to find out how to convert a string to a number in C#. That's not specific to Ardity, but C#, look for a method that mentions "parsing" a string as a number. StackOverflow is a good place to find an answer to this.
Here is the script:
/**
*/
using UnityEngine;
using System.Collections;
using UnityEditor;
/**
Sample for reading using polling by yourself, and writing too.
*/
public class SampleUserPolling_ReadWrite : MonoBehaviour
{
public SerialController serialController;
public string speed;
// Initialization
void Start()
{
serialController = GameObject.Find("SerialController").GetComponent();
}
// Executed each frame
void Update()
{
}
}
Im trying to send my car speed to my arduino so it can display it to a lcd
The text was updated successfully, but these errors were encountered: